Docker: Improve docker-compose.yml examples

This commit is contained in:
Michael Mayer 2021-10-23 12:24:32 +02:00
parent 244aaaa3e7
commit d9750b24a5
9 changed files with 165 additions and 138 deletions

View file

@ -14,9 +14,9 @@ to a folder of your choice, change it as needed, and run "docker-compose up":
wget https://dl.photoprism.org/docker/arm64/docker-compose.yml
sudo docker-compose up -d
Please always change PHOTOPRISM_ADMIN_PASSWORD so that PhotoPrism starts with a secure initial password.
Never use "photoprism", or other easy-to-guess passwords, on a public server.
A minimum length of 4 characters is required.
Always change PHOTOPRISM_ADMIN_PASSWORD so that the app starts with a secure initial password.
Never use easy-to-guess passwords or default values like insecure on publicly accessible servers.
There is no default in case no password was provided. A minimum length of 4 characters is required.
For more details, see:
- https://docs.photoprism.org/getting-started/docker-compose/
@ -50,8 +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
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.
For more examples, see 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.
## System Requirements ##

View file

@ -2,8 +2,9 @@ version: '3.5'
# Example Docker Compose config file for PhotoPrism (Raspberry Pi and other ARM-based devices)
#
# ATTENTION: It's important that you 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.
#
# Documentation : https://docs.photoprism.org/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -11,9 +12,9 @@ version: '3.5'
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
#
# -------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# -------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -30,17 +31,18 @@ version: '3.5'
#
# 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 change the home directory "~" to "/root" in your configuration.
services:
photoprism:
# Our stable version and development preview now come as a single multi-arch image for AMD64, ARM64, and ARMv7.
# Use photoprism/photoprism:preview instead for testing preview builds:
# ATTENTION: 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:
# platform: "linux/arm/v7"
# platform: "linux/arm"
depends_on:
- mariadb
# Only enable automatic restarts once your installation is properly
@ -105,9 +107,6 @@ services:
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# ATTENTION: 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.
mariadb:
restart: unless-stopped
image: arm64v8/mariadb:10.6
@ -123,14 +122,33 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# ATTENTION: 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.
#
# mariadb:
# restart: unless-stopped
# image: lscr.io/linuxserver/mariadb:latest
# 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=120
# volumes:
# - "./mariadb:/config" # Never remove
# environment:
# MYSQL_ROOT_PASSWORD: insecure
# MYSQL_DATABASE: photoprism
# MYSQL_USER: photoprism
# MYSQL_PASSWORD: insecure
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account

View file

@ -5,12 +5,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# -------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# -------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -27,14 +28,15 @@ version: '3.5'
#
# 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 change the home directory "~" to "/root" in your configuration.
services:
photoprism:
# Our stable version and development preview now come as a single multi-arch image for AMD64, ARM64, and ARMv7.
# Use photoprism/photoprism:preview instead for testing preview builds:
# ATTENTION: 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:
@ -100,6 +102,8 @@ services:
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# NOTE: Owners of ARMv7-based devices have to revert to lscr.io/linuxserver/mariadb:latest if they
# want to use MariaDB. The official image is available for AMD64 and ARM64 only.
mariadb:
restart: unless-stopped
image: lscr.io/linuxserver/mariadb:latest
@ -115,14 +119,14 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account

View file

@ -57,7 +57,8 @@ version: '3.5'
# will be disabled on servers with less than 2 GB of physical memory.
#
# DOCKER COMPOSE COMMAND REFERENCE
# -------------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -95,7 +96,7 @@ version: '3.5'
services:
photoprism:
restart: always
# Use photoprism/photoprism:preview instead for testing preview builds:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
container_name: photoprism
depends_on:

View file

@ -5,12 +5,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# ------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# ------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -27,13 +28,13 @@ version: '3.5'
#
# 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 change the home directory "~" to "/root" in your configuration.
services:
photoprism:
# Use photoprism/photoprism:preview instead for testing preview builds:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
@ -121,14 +122,14 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account

View file

@ -5,12 +5,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# ------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# ------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -27,11 +28,10 @@ version: '3.5'
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
# -------------------------------------------------------------------
services:
photoprism:
# Use photoprism/photoprism:preview instead for testing preview builds:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
@ -100,17 +100,17 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
volumes:
mariadb_data:

View file

@ -7,12 +7,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# ------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# ------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -29,13 +30,13 @@ version: '3.5'
#
# 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 change the home directory "~" to "/root" in your configuration.
services:
photoprism:
# Use photoprism/photoprism:preview instead for testing preview builds:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
container_name: photoprism
depends_on:
@ -122,15 +123,14 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./jobs.ini:/etc/ofelia/config.ini"
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# container_name: watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account

View file

@ -5,12 +5,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# ------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# ------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -27,13 +28,13 @@ version: '3.5'
#
# 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 change the home directory "~" to "/root" in your configuration.
services:
photoprism:
# Use photoprism/photoprism:preview instead 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:
@ -88,14 +89,14 @@ services:
# Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account

View file

@ -8,12 +8,13 @@ version: '3.5'
# Documentation : https://docs.photoprism.org/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
#
# Please run behind a reverse proxy like Caddy, Traefik or Nginx if you need HTTPS / SSL support
# e.g. when running PhotoPrism on a public server outside your home network.
# 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.
#
# ------------------------------------------------------------------
# DOCKER COMPOSE COMMAND REFERENCE
# ------------------------------------------------------------------
# see https://docs.photoprism.org/getting-started/docker-compose/#command-line-interface
# --------------------------------------------------------------------------------------
# Start | docker-compose up -d
# Stop | docker-compose stop
# Update | docker-compose pull
@ -30,11 +31,10 @@ version: '3.5'
#
# To search originals for faces without a complete rescan:
# docker-compose exec photoprism photoprism faces index
# -------------------------------------------------------------------
services:
photoprism:
# Use photoprism/photoprism:preview instead for testing preview builds:
# Use photoprism/photoprism:preview for testing preview builds:
image: photoprism/photoprism:latest
depends_on:
- mariadb
@ -102,17 +102,17 @@ services:
MYSQL_USER: photoprism
MYSQL_PASSWORD: insecure
# Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available:
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
# OPTIONAL: Uncomment the following lines to upgrade automatically, whenever there is a new Docker image available.
#
# watchtower:
# restart: unless-stopped
# image: containrrr/watchtower
# environment:
# WATCHTOWER_CLEANUP: "true"
# WATCHTOWER_POLL_INTERVAL: 7200 # Checks for updates every two hours
# volumes:
# - "/var/run/docker.sock:/var/run/docker.sock"
# - "~/.docker/config.json:/config.json" # Optional, for authentication if you have a Docker Hub account
volumes:
mariadb_data: