Files
2025-07-14 15:26:05 +01:00

81 lines
2.8 KiB
YAML

services:
immich:
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
container_name: immich
restart: unless-stopped
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
expose:
- 2283
env_file:
- .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.immich.rule=Host(`${IMMICH_HOSTNAME?}`)"
- "traefik.http.routers.immich.entrypoints=websecure"
- "traefik.http.routers.immich.tls.certresolver=letsencrypt"
- "traefik.http.services.immich.loadbalancer.server.port=2283"
volumes:
- ${DOCKER_DATA_DIR}/immich/library:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
depends_on:
immich_redis:
condition: service_healthy
immich_postgres:
condition: service_healthy
profiles:
- immich
- all
immich_machine-learning:
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
container_name: immich_machine-learning
restart: unless-stopped
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- ${DOCKER_DATA_DIR}/immich/model-cache:/cache
env_file:
- .env
profiles:
- immich
- all
immich_redis:
image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
container_name: immich_redis
restart: unless-stopped
healthcheck:
test: redis-cli ping || exit 1
profiles:
- immich
- all
immich_postgres:
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
container_name: immich_postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
# Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
# DB_STORAGE_TYPE: 'HDD'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DOCKER_DATA_DIR}/immich/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DB_USERNAME}"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles:
- immich
- all