DB_USERNAME=postgres DB_PASSWORD=postgres DB_HOST=immich_postgres DB_HOSTNAME=immich_postgres DB_PORT=5432 DB_DATABASE_NAME=immich POSTGRES_PASSWORD=postgres MACHINE_LEARNING_GPU_ACCELERATION=cuda MACHINE_LEARNING_HOST=http://192.168.1.32:3003 #optional MACHINE_LEARNING_PORT=3003 #optional MACHINE_LEARNING_WORKERS=1 #optional MACHINE_LEARNING_WORKER_TIMEOUT=120 #optional NVIDIA_VISIBLE_DEVICES=all REDIS_HOSTNAME=immich_redis REDIS_PORT=6379 #optional REDIS_PASSWORD= IMMICH_API_KEY= # your_immich_api_key IMMICH_URL=http://192.168.1.31:2283 # Your immich instace ip address and port EXTERNAL_IMMICH_URL= # External address of immich GOOGLE_MAPS_API_KEY=# Google Maps API Key GEMINI_API_KEY=# Gemini API Key UPLOAD_LOCATION=/share/media/assets/photos DB_DATA_LOCATION=/share/data/dockerapps/immich/db/postgres IMMICH_VERSION=v.1.142.0 #release IMMICH_PROXY=/share/data/dockerapps/immich-proxy/ IMMICH_TELEMETRY_INCLUDE=all IMMICH_BASE_URL=http://192.168.1.31:2283/api PUID=0 -------------------------------------------------------- name: immich-prod services: immich-server: deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: - gpu cpus: '4' memory: '8G' limits: cpus: '8' memory: '12G' container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} env_file: - stack.env ports: - "2283:8080" depends_on: - redis - database restart: always networks: qnet-static-eth0-79e6cc: ipv4_address: "192.168.1.31" monitoring: healthcheck: disable: false immich-machine-learning: deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: - gpu cpus: '6' # Number of CPU threads memory: '8G' # Gigabytes of memory limits: cpus: '8' memory: '12G' container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda devices: - /dev/dri:/dev/dri #inline hwaccel.transcoding.yml ports: - "3003:3003" volumes: - model-cache:/cache env_file: - stack.env restart: always networks: monitoring: healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 healthcheck: test: redis-cli ping || exit 1 restart: always database: deploy: resources: limits: cpus: '6' memory: 24G reservations: cpus: '2' memory: 4G container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:8d292bdb796aa58bbbaa47fe971c8516f6f57d6a47e7172e62754feb6ed4e7b0 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 - ${DB_DATA_LOCATION}:/var/lib/postgresql/data shm_size: 128mb restart: always power-tools: deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: - gpu cpus: '2' memory: '2G' limits: cpus: '2' memory: '2G' container_name: immich_power_tools image: ghcr.io/varun-raj/immich-power-tools:latest devices: - /dev/dri:/dev/dri env_file: - stack.env healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] interval: 30s timeout: 10s retries: 5 start_period: 40s restart: always ports: - 8001:3000 depends_on: immich-server: condition: service_healthy networks: qnet-static-eth0-79e6cc: ipv4_address: "192.168.1.34" monitoring: ################################## EXTRAS # watchtower: # image: containrrr/watchtower # command: # - --cleanup=true # restart: always # volumes: # - /var/run/docker.sock:/var/run/docker.sock # networks: # qnet-static-eth0-79e6cc: # ipv4_address: "192.168.1.39" # extra_hosts: # - host.docker.internal:host-gateway volumes: model-cache: # prometheus-data: # grafana-data: networks: qnet-static-eth0-79e6cc: external: true monitoring: driver: bridge internal: true