PhotoPrism使用Docker可以快速部署,我自已是用Openmediavault compose套件
PhotoPrism官方並沒有整合MariaDB或是MySQL,OMV為了要隔離OS與APP的關係,所以我做了下面這個整合的 PhotoPrism+MariaDB Compos
services:
photoprism:
image: photoprism/photoprism:latest
stop_grace_period: 10s
depends_on:
– mariadb
security_opt:
– seccomp:unconfined
– apparmor:unconfined
ports:
– “2342:2342”
environment:
PHOTOPRISM_ADMIN_USER: “admin”
PHOTOPRISM_ADMIN_PASSWORD: “insecure”
PHOTOPRISM_AUTH_MODE: “password”
PHOTOPRISM_SITE_URL: “http://localhost:2342/”
PHOTOPRISM_DISABLE_TLS: “false”
PHOTOPRISM_DEFAULT_TLS: “true”
PHOTOPRISM_ORIGINALS_LIMIT: 5000
PHOTOPRISM_HTTP_COMPRESSION: “gzip”
PHOTOPRISM_LOG_LEVEL: “info”
PHOTOPRISM_DATABASE_DRIVER: “mysql”
PHOTOPRISM_DATABASE_SERVER: “mariadb:3306”
PHOTOPRISM_DATABASE_NAME: “photoprism”
PHOTOPRISM_DATABASE_USER: “photoprism”
PHOTOPRISM_DATABASE_PASSWORD: “insecure”
PHOTOPRISM_SITE_CAPTION: “AI-Powered Photos App”
working_dir: “/photoprism”
volumes:
– “~/Pictures:/photoprism/originals”
– “./storage:/photoprism/storage”
mariadb:
image: mariadb:11
restart: unless-stopped
stop_grace_period: 5s
security_opt:
– seccomp:unconfined
– apparmor:unconfined
command: –innodb-buffer-pool-size=512M –transaction-isolation=READ-COMMITTED –character-set-server=utf8mb4 –collation-server=utf8mb4_unicode_ci –max-connections=512 –innodb-rollback-on-timeout=OFF –innodb-lock-wait-timeout=120
volumes:
– “./database:/var/lib/mysql”
environment:
MARIADB_AUTO_UPGRADE: “1”
MARIADB_INITDB_SKIP_TZINFO: “1”
MARIADB_DATABASE: “photoprism”
MARIADB_USER: “photoprism”
MARIADB_PASSWORD: “insecure”
MARIADB_ROOT_PASSWORD: “insecure”
watchtower:
restart: unless-stopped
image: containrrr/watchtower
profiles: [“update”]
environment:
WATCHTOWER_CLEANUP: “true”
WATCHTOWER_POLL_INTERVAL: 7200
volumes:
– “/var/run/docker.sock:/var/run/docker.sock”
– “~/.docker/config.json:/config.json” # optional, for authentication if needed
需修改的部份
PHOTOPRISM_ADMIN_PASSWORD: “insecure”
修改 photoprism web界面 admin 帳號的預設密碼
PHOTOPRISM_DATABASE_NAME: “photoprism”
PHOTOPRISM_DATABASE_USER: “photoprism”
PHOTOPRISM_DATABASE_PASSWORD: “insecure”
修改 連接 Mariadb 的資料庫、使用者、密碼
volumes:
– “~/Pictures:/photoprism/originals”
修改 圖片存放的路徑
– “./storage:/photoprism/storage”
修改 快取等資料的路徑
MARIADB_DATABASE: “photoprism”
MARIADB_USER: “photoprism”
MARIADB_PASSWORD: “insecure”
MARIADB_ROOT_PASSWORD: “insecure”
MariaDB的資料庫/使用者/密碼/Root的密碼
選擇性修改的部份
photoprism對外的連接port
ports:
– “2342:2342”
隨機文章
- session還是記錄一下時間比較好 (2009-02-27)
- [chatGPT 測試]寫一隻 Windows環境下的Python,調用ffmepg調整解析度為1080 (2024-04-23)
- 好專業的工程師?! (2016-08-30)
- 服務超爛的國泰世華銀行 (2009-06-30)
- 有人跟我說原價屋是這麼經營的,有一個說不是 (2016-12-17)