這是本文件的舊版!
[Draft]在 Alpine 上安裝 PhotoPrism
- VM : 2vCore / 4GRAM / 32GSSD
- OS : Alpine 3 參考 - 在 Alpine Linux 3 底下安裝 docker + docker-compose
安裝程序
- 採用 cifs 方式將 NAS 內的 LocalPhotos
//192.168.11.245/Photos/LocalPhotos
掛入
/root/Pictures
- 處理程序:
su - apk add cifs-utils cat <<EOF | tee /root/.smb > /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 內的密碼與網址設定
: 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