Files
nas-compose/photo-collector/docker-compose.yml
2024-08-09 11:50:37 +10:00

59 lines
2.0 KiB
YAML

name: photo-collector
services:
immich:
hostname: immich
image: ghcr.io/immich-app/immich-server:release
networks:
- reverse-proxy
- default
depends_on:
- immich_redis
- immich_postgres
environment:
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE_NAME: immich
volumes:
- ${NASCOMPOSE_DATA?}/media/photos/:/usr/src/app/upload/
restart: unless-stopped
labels:
traefik.enable: true
traefik.http.routers.immich.middlewares: authelia@file
immich-machine-learning:
hostname: immich-machine-learning
image: ghcr.io/immich-app/immich-machine-learning:release
volumes:
- ${NASCOMPOSE_SERVICES?}/photo-collector/volumes/imich_ml_cache/:/cache/
restart: unless-stopped
immich_redis:
hostname: immich_redis
image: redis:6.2-alpine
healthcheck:
test: redis-cli ping || exit 1
restart: unless-stopped
immich_postgres:
hostname: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.2.0
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: immich
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${NASCOMPOSE_SERVICES?}/photo-collector/volumes/immich_postgres_data/:/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: unless-stopped
networks:
reverse-proxy:
external: true