====== 在 Alpine 上安裝 PhotoPrism ======
* VM : 2vCore / 4GRAM / 32GSSD
* OS : Alpine 3 參考 - [[tech/alpine_docker]]
===== 安裝程序 =====
* 採用 cifs 方式將 NAS 內的 LocalPhotos //192.168.11.245/Photos/LocalPhotos 掛入 /root/Pictures
* 處理程序:
su -
apk add cifs-utils
cat < /dev/null
username=jonathan
password=xxxxxxx
EOF
chmod 600 /root/.smb
mkdir -p /root/Pictures
mount -t cifs -o credentials=/root/.smb //192.168.11.245/Photos/LocalPhotos /root/Pictures
* 如果可以正確掛上 /root/Pictures 看到 NAS 內的檔案, 就可以設定開機自動掛上
rc-update add netmount
echo "//192.168.11.245/Photos/LocalPhotos /root/Pictures cifs credentials=/root/.smb 0 0" >> /etc/fstab
* 使用 Docker Compose 進行安裝
wget https://dl.photoprism.app/docker/docker-compose.yml
* 修改 docker-compose.yml 內的 restart, 密碼與網址設定
:
services:
photoprism:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
restart: unless-stopped
:
PHOTOPRISM_ADMIN_PASSWORD: "xxxxxxxxxx" # initial superadmin password (minimum 8 characters)
:
PHOTOPRISM_SITE_URL: "http://photoprism.ichiayi.com:2342/" # server URL in the format "http(s)://domain.name(:port)/(path)"
:
PHOTOPRISM_DATABASE_PASSWORD: "xxxxxxxxxx" # MariaDB or MySQL database user password
:
:
MARIADB_PASSWORD: "xxxxxxxxxx"
MARIADB_ROOT_PASSWORD: "xxxxxxxxxx"
:
* 啟動服務
docker-compose up -d
===== 開始使用 =====
* Exp. http://192.168.11.202:2342/ 使用 admin / xxxxxxx 登入
* 開始對 NAS 內的 LocalPhotos 建立索引 - Library -> INDEX -> START \\ {{:tech:2023-01-15_002432.png?600|}}
===== 參考網址 =====
* https://docs.photoprism.app/getting-started/
* https://www.hiroom2.com/2017/08/21/alpinelinux-3-6-cifs-utils-en/
{{tag>AI 照片管理}}