services: immich-server: container_name: immich-server image: ghcr.io/immich-app/immich-server:v1.112.1 restart: unless-stopped depends_on: - traefik stop_grace_period: 2m volumes: - /mnt/sync/immich:/usr/src/app/upload - /mnt/sync/photostructure/library:/mnt/photostructure:ro - /etc/localtime:/etc/localtime:ro environment: - TZ=Europe/Paris - DB_HOSTNAME=immich-db - DB_USERNAME=postgres - DB_PASSWORD=${POSTGRES_PASSWORD} - DB_DATABASE_NAME=immich labels: - "traefik.enable=true" - "traefik.http.routers.immich.rule=Host(`photos.bhasher.com`)" - "traefik.http.routers.immich.entrypoints=internalsecure" - "traefik.http.services.immich.loadbalancer.server.port=3001" - "traefik.http.routers.immich.tls=true" - "traefik.http.routers.immich.tls.certresolver=http" - "com.centurylinklabs.watchtower.enable=true" networks: - external - immich - storage immich-ml: container_name: immich-ml image: ghcr.io/immich-app/immich-machine-learning:v1.112.1 volumes: - $DATA/immich/ml-cache:/cache environment: - TZ=Europe/Paris - DB_USERNAME=postgres - DB_PASSWORD=${POSTGRES_PASSWORD} - DB_DATABASE_NAME=immich networks: - immich immich-db: container_name: immich-db image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_USER=postgres - POSTGRES_DB=immich - POSTGRES_INITDB_ARGS='--data-checksums' volumes: - $DATA/immich/db:/var/lib/postgresql/data healthcheck: test: pg_isready --dbname='immich' --username='postgres' || exit 1; Chksum="$$(psql --dbname='immich' --username='postgres' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"] restart: always networks: - immich networks: immich: