services:
immich-redis:
image: redis
container_name: Immich-REDIS
hostname: immich-redis
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
user: 1026:101
environment:
- TZ=Europe/Berlin
volumes:
- /volume2/docker/immich/redis:/data:rw
restart: on-failure:5
immich-db:
image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.2.0
container_name: Immich-DB
hostname: immich-db
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "immich", "-U", "immichuser"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- /volume2/docker/immich/db:/var/lib/postgresql/data:rw
environment:
- TZ=Europe/Berlin
- POSTGRES_DB=immich
- POSTGRES_USER=immichuser
- POSTGRES_PASSWORD=immichpw
- DB_STORAGE_TYPE=HDD #Remove the red # in front of the – DB_STORAGE_TYPE=HDD if your database isn’t stored on SSDs.
restart: on-failure:5
immich-server:
image: ghcr.io/immich-app/immich-server:release
container_name: Immich-SERVER
hostname: immich-server
user: 1026:101
security_opt:
- no-new-privileges:true
env_file:
- stack.env
ports:
- 8212:2283
volumes:
- /volume2/docker/immich/upload:/usr/src/app/upload:rw
- /volume1/photo/immich:/volume1/photo/immich
restart: on-failure:5
depends_on:
immich-redis:
condition: service_healthy
immich-db:
condition: service_started
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:release
container_name: Immich-LEARNING
hostname: immich-machine-learning
user: 1026:101
security_opt:
- no-new-privileges:true
env_file:
- stack.env
volumes:
- /volume2/docker/immich/upload:/usr/src/app/upload:rw
- /volume2/docker/immich/cache:/cache:rw
- /volume2/docker/immich/matplotlib:/matplotlib:rw
environment:
- MPLCONFIGDIR=/matplotlib
restart: on-failure:5
depends_on:
immich-db:
condition: service_started
immich-folder-album-creator:
container_name: immich_folder_album_creator
image: salvoxia/immich-folder-album-creator:latest
restart: unless-stopped
environment:
API_URL:
http://192.xxx.x.xx:8212/api
API_KEY: "LJ9UNqoxEe1reFJWAWNhZEZNOLTwYX6Petew5vQNvOA"
ROOT_PATH: /volume1/photo/immich
ALBUM_LEVELS: "2,2"
CRON_EXPRESSION: "0 * * * *"
TZ: Europe/Berlin