services: immich-server: image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} hostname: '{{.Node.Hostname}}' deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname != truenas labels: - "traefik.enable=true" - "traefik.http.routers.immich.rule=Host(`immich.offsetmonkey538.top`)" - "traefik.http.routers.immich.entrypoints=websecure" - "traefik.http.services.immich.loadbalancer.server.port=2283" volumes: - /etc/localtime:/etc/localtime:ro # Main library - immich_library:/usr/src/app/upload # External libraries - dave_backups:/dave/Backups:ro - vana_arvuti_failid:/vana/arvuti:ro environment: TZ: Europe/Tallinn DB_PASSWORD: ${DB_PASSWORD} depends_on: - redis - database healthcheck: disable: false networks: - traefik-proxy - immich immich-machine-learning: image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} hostname: '{{.Node.Hostname}}' deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname != truenas volumes: - model_cache:/cache environment: TZ: Europe/Tallinn MACHINE_LEARNING_MODEL_TTL: 0 MACHINE_LEARNING_PRELOAD__CLIP: ViT-B-16-SigLIP-384__webli healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3003/health"] interval: 30s timeout: 10s retries: 10 start_period: 10m networks: - immich redis: image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 hostname: '{{.Node.Hostname}}' deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname != truenas healthcheck: test: redis-cli ping || exit 1 networks: - immich database: image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:8d292bdb796aa58bbbaa47fe971c8516f6f57d6a47e7172e62754feb6ed4e7b0 hostname: '{{.Node.Hostname}}' deploy: mode: replicated replicas: 1 placement: constraints: - node.hostname == truenas environment: TZ: Europe/Tallinn POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: postgres POSTGRES_DB: immich 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: - immich_database:/var/lib/postgresql/data - type: tmpfs target: /dev/shm tmpfs: size: 134217728 # 128*2^20 bytes = 128Mb networks: - immich networks: immich: external: false driver: overlay traefik-proxy: external: true volumes: immich_library: driver: local driver_opts: type: "nfs" o: "addr=10.0.0.100,rw,async,nfsvers=4,nosuid,nolock" device: ":/mnt/data/apps/immich/upload/" dave_backups: driver: local driver_opts: type: "nfs" o: "addr=10.0.0.100,ro,async,nfsvers=4,nosuid,nolock" device: ":/mnt/data/user/dave/Backups/" vana_arvuti_failid: driver: local driver_opts: type: "nfs" o: "addr=10.0.0.100,ro,async,nfsvers=4,nosuid,nolock" device: ":/mnt/data/user/vana/arvuti/files/" model_cache: immich_database: driver: local driver_opts: type: none device: /mnt/apps-ssd/apps/immich/data/database o: bind