Skip to content

Instantly share code, notes, and snippets.

@skinnylatte
Last active May 19, 2021
Embed
What would you like to do?
Photoprism setup for docker compose, including swag
version: "3.7"
services:
# swag for nginx, letsencrypt, and proxy
swag:
image: ghcr.io/linuxserver/swag
container_name: swag
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Americas/Los_Angeles
- URL=jtcloud.org
- SUBDOMAINS=www,files,photos,mailarchive,home
- VALIDATION=http
- CERTPROVIDER=letsencrypt #optional
# - DNSPLUGIN=hetzner #optional
- PROPAGATION= #optional
- DUCKDNSTOKEN= #optional
- EMAIL=adrianna@jefritan.com #optional
- ONLY_SUBDOMAINS=false #optional
- EXTRA_DOMAINS= #optional
- STAGING=false #optional
- MAXMINDDB_LICENSE_KEY= #optional
volumes:
- ./appdata/swag:/config
ports:
- 443:443
- 80:80 #optional
restart: unless-stopped
networks:
- proxy
### photoprism for photos.jtcloud.org
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- 2342:2342
environment:
PHOTOPRISM_SITE_URL: "https://photos.yourdomain.com"
PHOTOPRISM_SITE_TITLE: "ADJT Photos"
PHOTOPRISM_SITE_CAPTION: "Personal photo archives"
PHOTOPRISM_ADMIN_PASSWORD: "yourpassword"
PHOTOPRISM_ORIGINALS_LIMIT: 100000
PHOTOPRISM_HTTP_COMPRESSION: "gzip"
PHOTOPRISM_DEBUG: "false"
PHOTOPRISM_PUBLIC: "false"
PHOTOPRISM_READONLY: "false"
PHOTOPRISM_EXPERIMENTAL: "false"
PHOTOPRISM_DISABLE_WEBDAV: "false"
PHOTOPRISM_DISABLE_SETTINGS: "false"
PHOTOPRISM_DISABLE_TENSORFLOW: "false"
PHOTOPRISM_DARKTABLE_PRESETS: "false"
PHOTOPRISM_DETECT_NSFW: "true"
PHOTOPRISM_UPLOAD_NSFW: "true"
PHOTOPRISM_DATABASE_DRIVER: "mysql"
PHOTOPRISM_DATABASE_SERVER: "mariadb:3306"
PHOTOPRISM_DATABASE_NAME: "photoprism"
PHOTOPRISM_DATABASE_USER: "photoprism"
PHOTOPRISM_DATABASE_PASSWORD: "yourpassword"
PHOTOPRISM_SITE_AUTHOR: "Adrianna Jefri-Tan"
PHOTOPRISM_WORKERS: 3
volumes:
- ./photoprism/photos:/photoprism/originals
- ./photoprism/storage:/photoprism/storage
- ./photoprism/import:/photoprism/import
networks:
- proxy
### db for photo prism
mariadb:
image: mariadb:10.5
container_name: mariadb
restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
command: mysqld --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=50
volumes: # Don't remove permanent storage for index database files!
- "./photoprism/database:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: mysqlpw
MYSQL_DATABASE: photoprism
MYSQL_USER: photoprism
MYSQL_PASSWORD: mysqlpw
networks:
- proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment