Config: Improve docker-compose.yml files for prod & dev environments

This commit is contained in:
Michael Mayer 2021-10-25 17:10:50 +02:00
parent 2f19cbcf6a
commit 644507bfaa
15 changed files with 248 additions and 208 deletions

View file

@ -1,14 +1,15 @@
version: '3.5'
# Legacy databases servers for testing.
# Legacy Databases Servers (for developers only)
services:
# Affected by MDEV-25362: Incorrect name resolution for subqueries in ON expressions
# see https://jira.mariadb.org/browse/MDEV-25362
## Affected by MDEV-25362: Incorrect name resolution for subqueries in ON expressions
## see https://jira.mariadb.org/browse/MDEV-25362
mariadb-10-5-5:
image: mariadb:10.5.5
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:
@ -21,7 +22,7 @@ services:
image: mariadb:10.3
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:
@ -34,7 +35,7 @@ services:
image: mariadb:10.2
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:
@ -47,7 +48,7 @@ services:
image: mariadb:10.1
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:
@ -60,7 +61,7 @@ services:
image: mysql:8
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:

View file

@ -1,5 +1,7 @@
version: '3.5'
# Drone CI Test Environment
services:
photoprism:
build: .
@ -143,7 +145,7 @@ services:
image: mariadb:10.6
command: mysqld --port=4001 --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
expose:
- "4001"
- "4001" # Database port (internal)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:

View file

@ -1,14 +1,16 @@
version: '3.5'
# Latest stable version for testing.
# Stable Release (for developers only)
services:
## App Server (required)
photoprism-latest:
image: photoprism/photoprism:latest
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2344:2342" # [server]:[container]
- "2344:2342" # HTTP port (host:container)
environment:
PHOTOPRISM_UID: ${UID:-1000}
PHOTOPRISM_GID: ${GID:-1000}

View file

@ -1,6 +1,11 @@
version: '3.5'
# For developers only! PostgreSQL is NOT supported yet as Gorm (the ORM library) needs to be
# upgraded first. The current version does NOT support compatible general data types:
# https://github.com/photoprism/photoprism/issues/47
services:
## App Server (required)
photoprism:
build: .
image: photoprism/photoprism:develop
@ -11,8 +16,8 @@ services:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342" # Web Server (PhotoPrism)
- "2343:2343" # Acceptance Tests
- "2342:2342" # Default HTTP port (host:container)
- "2343:2343" # Acceptance Test HTTP port (host:container)
working_dir: "/go/src/github.com/photoprism/photoprism"
volumes:
- ".:/go/src/github.com/photoprism/photoprism"
@ -65,7 +70,7 @@ services:
postgres:
image: postgres:12-alpine
ports:
- "5432:5432" # Exposes port 5432 on host
- "5432:5432" # Database port (host:container)
environment:
POSTGRES_DB: photoprism
POSTGRES_USER: photoprism

View file

@ -1,14 +1,16 @@
version: '3.5'
# Reverse proxy servers for testing.
# HTTP / HTTPS Reverse Proxy Servers (for developers only)
services:
## Caddy 2
caddy:
image: caddy:2
depends_on:
- photoprism
ports:
- "80:80"
- "443:443"
- "80:80" # HTTP port (host:container)
- "443:443" # HTTPS port (host:container)
volumes:
- ./docker/development/caddy:/data/caddy/pki/authorities/local
- ./docker/development/caddy/Caddyfile:/etc/caddy/Caddyfile

View file

@ -1,6 +1,9 @@
version: '3.5'
# Default environment with app server, database, and dummy services (for developers only)
services:
## App Server
photoprism:
build: .
image: photoprism/photoprism:develop
@ -11,8 +14,8 @@ services:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342" # Web Server (PhotoPrism)
- "2343:2343" # Acceptance Tests
- "2342:2342" # Default HTTP port (host:container)
- "2343:2343" # Acceptance Test HTTP port (host:container)
shm_size: "2gb"
environment:
PHOTOPRISM_UID: ${UID:-1000}
@ -60,16 +63,16 @@ services:
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
PHOTOPRISM_JPEG_QUALITY: 92 # Set to 95 for high-quality thumbnails (25-100)
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
# Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
# Hardware video transcoding options:
## Hardware video transcoding config (optional):
# PHOTOPRISM_FFMPEG_BUFFERS: "64" # FFmpeg capture buffers (default: 32)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # FFmpeg encoding bitrate limit in Mbit/s (default: 50)
# PHOTOPRISM_FFMPEG_ENCODER: "h264_v4l2m2m" # Use Video4Linux for AVC transcoding (default: libx264)
# PHOTOPRISM_FFMPEG_ENCODER: "h264_qsv" # Use Intel Quick Sync Video for AVC transcoding (default: libx264)
# PHOTOPRISM_INIT: "intel-graphics tensorflow-amd64-avx2" # Enable TensorFlow AVX2 & Intel Graphics support
# PHOTOPRISM_INIT: "install-updates" # Installs general operating system updates
# Optional hardware devices for video transcoding and machine learning:
## Hardware devices for video transcoding and machine learning (optional):
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
# - "/dev/dri/renderD128:/dev/dri/renderD128" # Intel GPU
@ -79,13 +82,14 @@ services:
- ".:/go/src/github.com/photoprism/photoprism"
- "go-mod:/go/pkg/mod"
## Database Server
mariadb:
image: mariadb:10.6
command: mysqld --port=4001 --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
expose:
- "4001"
ports:
- "4001:4001" # Exposes port 4001 on host
- "4001:4001" # Database port (host:container)
volumes:
- "./scripts/sql/init-test-databases.sql:/docker-entrypoint-initdb.d/init-test-databases.sql"
environment:

View file

@ -23,7 +23,7 @@ For more details, see:
- https://docs.photoprism.org/getting-started/config-options/
All commands may have to be prefixed with "sudo" when not running as root.
Note that this will change the home directory "~" to "/root" in your configuration.
This will change the home directory "~" to "/root" in your configuration.
Our repository on Docker Hub:
- https://hub.docker.com/r/photoprism/photoprism
@ -50,10 +50,10 @@ Use the --help flag to see a detailed command info like
| Re-index | docker-compose exec photoprism photoprism index -f
| Import | docker-compose exec photoprism photoprism import
For more examples, see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
NOTE: "photoprism index -f" will re-index all originals, including already indexed and unchanged files.
This may be necessary after upgrading, especially to new major versions.
"photoprism index -f" will re-index all originals, including already indexed and unchanged files.
This may be necessary after upgrading, especially to new major versions.
## System Requirements ##

View file

@ -2,15 +2,15 @@ version: '3.5'
# Example Docker Compose config file for PhotoPrism (Raspberry Pi and other ARM-based devices)
#
# Important: You have to boot your Raspberry Pi 3 / 4 with the parameter "arm_64bit=1"
# in config.txt to use our ARM64 image.
#
# Documentation : https://docs.photoprism.org/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# ATTENTION: You have to boot your Raspberry Pi 3 / 4 with the parameter "arm_64bit=1"
# in config.txt to use our ARM64 image.
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -28,39 +28,39 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# NOTE: All commands may have to be prefixed with "sudo" when not running as root.
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will point the home directory placeholder ~ to /root in volume mounts.
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# NOTE: photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
# ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
# photoprism/photoprism:latest for the stable release.
## photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
## ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
## photoprism/photoprism:latest for the stable release:
image: photoprism/photoprism:latest
# Owners of ARMv7-based devices may have to explicitly specify the image architecture:
## Owners of ARMv7-based devices may have to explicitly specify the image architecture:
# platform: "linux/arm"
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
# user: "1000:1000"
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "none" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_WORKERS: 2 # Limits the number of indexing workers to reduce system load
@ -89,27 +89,28 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
## Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
# PHOTOPRISM_UID: 1000
# PHOTOPRISM_GID: 1000
# PHOTOPRISM_UMASK: 0000
HOME: "/photoprism"
# Optional hardware devices for video transcoding and machine learning:
## Hardware devices for video transcoding and machine learning (optional):
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: arm64v8/mariadb:10.6
@ -125,9 +126,8 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# OPTIONAL: Owners of ARMv7-based devices have to revert to an alternative image if they want to use MariaDB.
# The official image is available for AMD64 and ARM64 only. Pay close attention to changed directory
# and environment variable names.
## Owners of ARMv7-based devices have to revert to an alternative image if they want to use MariaDB.
## The official image is available for AMD64 and ARM64 only. ARM64 users can remove this:
#
# mariadb:
# restart: unless-stopped
@ -144,7 +144,8 @@ services:
# MYSQL_USER: photoprism
# MYSQL_PASSWORD: insecure
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -5,9 +5,9 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -25,38 +25,38 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# NOTE: All commands may have to be prefixed with "sudo" when not running as root.
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will point the home directory placeholder ~ to /root in volume mounts.
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# NOTE: photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
# ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
# photoprism/photoprism:latest for the stable release.
## photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
## ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
## photoprism/photoprism:latest for the stable release:
image: photoprism/photoprism:latest
platform: "linux/arm"
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
# user: "1000:1000"
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "none" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_WORKERS: 1 # Limits the number of indexing workers to reduce system load
@ -84,27 +84,28 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
## Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
# PHOTOPRISM_UID: 1000
# PHOTOPRISM_GID: 1000
# PHOTOPRISM_UMASK: 0000
HOME: "/photoprism"
# Optional hardware devices for video transcoding and machine learning:
## Hardware devices for video transcoding and machine learning (optional):
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: lscr.io/linuxserver/mariadb:latest
@ -120,7 +121,8 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -72,11 +72,11 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
#
# USING LET'S ENCRYPT HTTPS
# --------------------------------------------------------------------------
#
@ -94,10 +94,13 @@ version: '3.5'
# You should now be able to access your instance without security warnings.
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
restart: always
# Use photoprism/photoprism:preview for testing preview builds:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
container_name: photoprism
depends_on:
@ -105,27 +108,27 @@ services:
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
user: "1000:1000"
# Don't expose port when running behind Traefik reverse proxy!
## Don't expose port when running behind Traefik reverse proxy!
# ports:
# - "2342:2342" # [server]:[container]
# - "2342:2342" # Exposed HTTP port (host:container)
labels:
- "traefik.enable=true"
- "traefik.http.services.photoprism.loadbalancer.server.port=2342"
- "traefik.http.routers.photoprism.tls=true"
- "traefik.http.routers.photoprism.entrypoints=websecure"
# !! REMOVE default route if your server has a public domain name !!
## !! REMOVE default route if your server has a public domain name !!
- "traefik.http.routers.photoprism.rule=PathPrefix(`/`)"
# !! UNCOMMENT and CHANGE to set the public domain name !!
## !! UNCOMMENT and CHANGE to set the public domain name !!
# - "traefik.http.routers.photoprism.rule=Host(`photos.yourdomain.com`)"
# !! UNCOMMENT to enable Let's Encrypt HTTPS !!
## !! UNCOMMENT to enable Let's Encrypt HTTPS !!
# - "traefik.http.routers.photoprism.tls.certresolver=myresolver"
# !! REMOVE both for Let's Encrypt HTTPS with default HTTP challenge (DNS challenge supports wildcards) !!
## !! REMOVE both for Let's Encrypt HTTPS with default HTTP challenge (DNS challenge supports wildcards) !!
- "traefik.http.routers.photoprism.tls.domains[0].main=example.com"
- "traefik.http.routers.photoprism.tls.domains[0].sans=*.example.com"
environment:
# !! CHANGE site url if your server has a public domain name e.g. "https://photos.yourdomain.com/" !!
## !! CHANGE site url if your server has a public domain name e.g. "https://photos.yourdomain.com/" !!
PHOTOPRISM_SITE_URL: "https://_public_ip_/"
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
@ -156,15 +159,16 @@ services:
HOME: "/photoprism"
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "./originals:/photoprism/originals"
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
- "./import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
- "./backup:/var/lib/photoprism"
# REQUIRED: Traefik Reverse Proxy, see https://docs.photoprism.org/getting-started/proxies/traefik/
## Traefik Reverse Proxy (required)
## see https://docs.photoprism.org/getting-started/proxies/traefik/
traefik:
restart: always
image: traefik:v2.4
@ -181,7 +185,8 @@ services:
- "./traefik.yaml:/etc/traefik/traefik.yaml"
- "./certs/:/certs/"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: always
image: mariadb:10.6
@ -198,7 +203,8 @@ services:
MYSQL_USER: "photoprism"
MYSQL_PASSWORD: "_admin_password_"
# RECOMMENDED: Ofelia Job Runner, see https://github.com/mcuadros/ofelia
## Ofelia Job Runner (recommended)
## see https://github.com/mcuadros/ofelia
ofelia:
restart: always
image: mcuadros/ofelia:latest
@ -207,7 +213,8 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./jobs.ini:/etc/ofelia/config.ini"
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
watchtower:
restart: always
image: containrrr/watchtower

View file

@ -5,9 +5,9 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -25,35 +25,35 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# NOTE: All commands may have to be prefixed with "sudo" when not running as root.
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will point the home directory placeholder ~ to /root in volume mounts.
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# Use photoprism/photoprism:preview for testing preview builds:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
# user: "1000:1000"
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
@ -79,37 +79,38 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
## Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
# PHOTOPRISM_UID: 1000
# PHOTOPRISM_GID: 1000
# PHOTOPRISM_UMASK: 0000
# Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
# Hardware video transcoding options:
## Hardware video transcoding config (optional):
# PHOTOPRISM_FFMPEG_BUFFERS: "64" # FFmpeg capture buffers (default: 32)
# PHOTOPRISM_FFMPEG_BITRATE: "32" # FFmpeg encoding bitrate limit in Mbit/s (default: 50)
# PHOTOPRISM_FFMPEG_ENCODER: "h264_v4l2m2m" # Use Video4Linux for AVC transcoding (default: libx264)
# PHOTOPRISM_FFMPEG_ENCODER: "h264_qsv" # Use Intel Quick Sync Video for AVC transcoding (default: libx264)
# PHOTOPRISM_INIT: "intel-graphics tensorflow-amd64-avx2" # Enable TensorFlow AVX2 & Intel Graphics support
HOME: "/photoprism"
# Optional hardware devices for video transcoding and machine learning:
## Hardware devices for video transcoding and machine learning (optional):
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
# - "/dev/dri/renderD128:/dev/dri/renderD128" # Intel GPU
# - "/dev/dri/card0:/dev/dri/card0"
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: mariadb:10.6
@ -125,7 +126,8 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -5,9 +5,9 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -25,30 +25,30 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# Use photoprism/photoprism:preview for testing preview builds:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
@ -73,21 +73,22 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysqll
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: mariadb:10.6
@ -103,7 +104,8 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -7,9 +7,9 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -27,36 +27,36 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# NOTE: All commands may have to be prefixed with "sudo" when not running as root.
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will point the home directory placeholder ~ to /root in volume mounts.
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
container_name: photoprism
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
# user: "1000:1000"
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
@ -82,26 +82,27 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
## Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
# PHOTOPRISM_UID: 1000
# PHOTOPRISM_GID: 1000
# PHOTOPRISM_UMASK: 0000
# Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: mariadb:10.6
@ -118,7 +119,8 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# REQUIRED: Ofelia Job Runner, see https://github.com/mcuadros/ofelia
## Ofelia Job Runner (required)
## see https://github.com/mcuadros/ofelia
ofelia:
restart: unless-stopped
image: mcuadros/ofelia:latest
@ -127,7 +129,8 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./jobs.ini:/etc/ofelia/config.ini"
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -5,9 +5,9 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -25,33 +25,33 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# NOTE: All commands may have to be prefixed with "sudo" when not running as root.
# Note: All commands may have to be prefixed with "sudo" when not running as root.
# This will point the home directory placeholder ~ to /root in volume mounts.
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# Use photoprism/photoprism:preview for testing preview builds:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
## Run as a specific, non-root user (see https://docs.docker.com/engine/reference/run/#user):
# user: "1000:1000"
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
@ -72,26 +72,27 @@ services:
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: ""
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
## Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
# PHOTOPRISM_UID: 1000
# PHOTOPRISM_GID: 1000
# PHOTOPRISM_UMASK: 0000
# Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
# Mounting the import folder is optional (see docs):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped

View file

@ -2,15 +2,18 @@ version: '3.5'
# Example Docker Compose config file for PhotoPrism (Windows / AMD64)
#
# NOTE: You may need to disable the WSL 2 based engine in Docker Settings > General
# to mount drives other than C: on Windows.
# Windows Pro users should disable the WSL 2 based engine in Docker Settings > General so that
# they can mount drives other than C:. This will enable Hyper-V, which Microsoft doesn't offer
# to its Windows Home customers. Docker Desktop uses dynamic memory allocation with WSL 2.
# It's important to explicitly increase the Docker memory limit to 4 GB or more when using Hyper-V.
# The default of 2 GB may reduce indexing performance and cause unexpected restarts.
#
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# IMPORTANT: When installing PhotoPrism on a public server outside your home network, please
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
# Attention: When installing PhotoPrism on a public server outside your home network,
# always run it behind a secure HTTPS reverse proxy like Traefik, Caddy, or NGINX.
# Your files and passwords will be transmitted in clear text otherwise.
#
# DOCKER COMPOSE COMMAND REFERENCE
# --------------------------------------------------------------------------
@ -28,30 +31,30 @@ version: '3.5'
# Reindex | docker-compose exec photoprism photoprism index -f
# Import | docker-compose exec photoprism photoprism import
#
# See https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface for more examples.
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
#
# More examples: https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
services:
# REQUIRED: PhotoPrism Application Server
## App Server (required)
photoprism:
# Use photoprism/photoprism:preview for testing preview builds:
## Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
# configured as it otherwise may get stuck in a restart loop:
# https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
## Only enable automatic restarts once your installation is properly
## configured as it otherwise may get stuck in a restart loop,
## see https://docs.photoprism.org/getting-started/faq/#why-is-photoprism-getting-stuck-in-a-restart-loop
# restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342" # [server]:[container]
- "2342:2342" # Exposed HTTP port (host:container)
environment:
PHOTOPRISM_ADMIN_PASSWORD: "insecure" # PLEASE CHANGE: Your initial admin password (min 4 characters)
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_SITE_URL: "http://localhost:2342/" # Public Server URL incl http:// or https:// and /path, :port is optional
PHOTOPRISM_ORIGINALS_LIMIT: 5000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode, shows additional log messages
@ -79,17 +82,18 @@ services:
HOME: "/photoprism"
working_dir: "/photoprism"
volumes:
# The *originals* folder contains your original photo and video files (- "C:/Directory:/photoprism/originals"):
## The *originals* folder contains your original photo and video files (- "C:/Directory:/photoprism/originals"):
- "~/Pictures:/photoprism/originals/Pictures"
# Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "D:/Pictures:/photoprism/originals/Pictures"
# - "E:/Friends:/photoprism/originals/Friends"
# You may mount an *import* folder from which files can be transferred to *originals* (optional):
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "E:/:/photoprism/import"
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# RECOMMENDED: MariaDB Server, see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
## Database Server (recommended)
## see https://docs.photoprism.org/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
mariadb:
restart: unless-stopped
image: mariadb:10.6
@ -98,14 +102,15 @@ services:
- 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=120
volumes:
- "mariadb_data:/var/lib/mysql" # Never remove
- "mariadb_data:/var/lib/mysql" # Never remove, the named volume "mariadb_data" is defined at the bottom
environment:
MYSQL_ROOT_PASSWORD: insecure
MYSQL_DATABASE: photoprism
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# OPTIONAL: Upgrades services automatically, see https://docs.photoprism.org/getting-started/updates/#watchtower
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.org/getting-started/updates/#watchtower
#
# watchtower:
# restart: unless-stopped
@ -117,6 +122,7 @@ services:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
## Named volume for the Database Server, never remove unless you mount a regular folder instead (slower)
volumes:
mariadb_data:
driver: local