# Immich — Self-Hosted Photo & Video Management name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-v3} # extends: # file: hwaccel.transcoding.yml # service: cpu environment: - DB_USERNAME=${DB_USERNAME} - DB_PASSWORD=${DB_PASSWORD} - DB_DATABASE_NAME=${DB_DATABASE_NAME} - TZ=${TZ} volumes: - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro ports: - "2283:2283" depends_on: database: condition: service_healthy redis: condition: service_healthy restart: unless-stopped networks: - immich - main immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-v3} # extends: # file: hwaccel.ml.yml # service: cpu environment: - TZ=${TZ} volumes: - model-cache:/cache restart: unless-stopped networks: - immich redis: container_name: immich_redis image: docker.io/valkey/valkey:9@sha256:3b55fbaa0cd93cf0d9d961f405e4dfcc70efe325e2d84da207a0a8e6d8fde4f9 restart: unless-stopped healthcheck: test: ["CMD-SHELL", "valkey-cli ping || exit 1"] interval: 10s timeout: 5s retries: 5 networks: - immich database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 environment: - POSTGRES_USER=${DB_USERNAME} - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_DB=${DB_DATABASE_NAME} - POSTGRES_INITDB_ARGS=--data-checksums - TZ=${TZ} volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data shm_size: 512mb restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE_NAME}"] interval: 10s timeout: 5s retries: 5 start_period: 15s networks: - immich volumes: model-cache: networks: main: external: true immich: driver: bridge