services: app: image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} container_name: immich-app environment: TZ: ${IMMICH_TZ:-America/Los_Angeles} DB_HOSTNAME: db DB_USERNAME: ${IMMICH_DB_USERNAME:-immich} DB_PASSWORD: ${IMMICH_DB_PASSWORD} DB_DATABASE_NAME: ${IMMICH_DB_DATABASE_NAME:-immich} REDIS_HOSTNAME: redis IMMICH_MACHINE_LEARNING_URL: http://machine-learning:3003 ports: - ${IMMICH_PORT:-2283}:2283 volumes: - ${IMMICH_UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro depends_on: db: condition: service_healthy redis: condition: service_healthy healthcheck: test: ["CMD", "immich-healthcheck"] interval: 30s timeout: 10s retries: 5 start_period: 60s restart: unless-stopped machine-learning: image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} container_name: immich-machine-learning environment: TZ: ${IMMICH_TZ:-America/Los_Angeles} volumes: - immich-model-cache:/cache healthcheck: test: ["CMD", "python3", "healthcheck.py"] interval: 30s timeout: 10s retries: 5 start_period: 60s restart: unless-stopped redis: image: docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf container_name: immich-redis healthcheck: test: ["CMD-SHELL", "redis-cli ping | grep -q PONG || exit 1"] interval: 10s timeout: 5s retries: 5 deploy: resources: limits: memory: 512M restart: unless-stopped db: image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 container_name: immich-db environment: POSTGRES_USER: ${IMMICH_DB_USERNAME:-immich} POSTGRES_PASSWORD: ${IMMICH_DB_PASSWORD} POSTGRES_DB: ${IMMICH_DB_DATABASE_NAME:-immich} POSTGRES_INITDB_ARGS: '--data-checksums' DB_STORAGE_TYPE: ${IMMICH_DB_STORAGE_TYPE:-SSD} volumes: - immich-db:/var/lib/postgresql/data shm_size: 128mb healthcheck: test: ["CMD-SHELL", "pg_isready -U ${IMMICH_DB_USERNAME:-immich} -d ${IMMICH_DB_DATABASE_NAME:-immich}"] interval: 10s timeout: 5s retries: 5 start_period: 30s restart: unless-stopped volumes: immich-db: name: immich-db immich-model-cache: name: immich-model-cache