services:
  immich-database:
    image: tensorchord/pgvecto-rs:pg14-v0.2.0
    environment:
      POSTGRES_DB: immich
      POSTGRES_PASSWORD: wuwwxyxg49s0zdvl
      POSTGRES_USER: immich
    volumes:
     - immich-postgres:/var/lib/postgresql/data
    deploy:
      restart_policy:
        condition: on-failure
  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:v1.106.4
    volumes:
     - immich-model-cache:/cache
    deploy:
      restart_policy:
        condition: on-failure
  immich-redis:
    image: redis:6.2-alpine
    volumes:
     - immich-redis-data:/data
    deploy:
      restart_policy:
        condition: on-failure
  immich-server:
    image: ghcr.io/immich-app/immich-server:v2.3.0
    environment:
      DB_DATABASE_NAME: immich
      DB_HOSTNAME: immich-database
      DB_PASSWORD: wuwwxyxg49s0zdvl
      DB_PORT: '5432'
      DB_USERNAME: immich
      FRONT_BASE_URL: https://immich.bendtstudio.com
      REDIS_DBINDEX: '0'
      REDIS_HOSTNAME: immich-redis
      REDIS_PORT: '6379'
      SERVER_URL: https://immich.bendtstudio.com
    volumes:
     - /mnt/synology-data/immich:/usr/src/app/upload
     - /mnt/photos:/var/photos
     - /etc/localtime:/etc/localtime:ro
    deploy:
      restart_policy:
        condition: on-failure
      placement:
        constraints:
         - node.labels.type == nas

volumes:
  immich-redis-data:
  immich-postgres:
  immich-model-cache:


