Files
nas-compose/photo-collector/compose.yaml
2024-10-16 17:40:03 +11:00

88 lines
2.5 KiB
YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
services:
immich:
extends:
file: ../compose.base.yaml
service: exposed-service
container_name: immich
image: ghcr.io/immich-app/immich-server:release
user: ${NASCOMPOSE_UID?}:${NASCOMPOSE_GID?}
networks:
- smtp-server
- default
depends_on:
- immich-redis
- immich-postgres
environment:
REDIS_HOSTNAME: immich-redis
DB_HOSTNAME: immich-postgres
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE_NAME: immich
volumes:
- ${NASCOMPOSE_DATA?}/media/photos/:/usr/src/app/upload/
immich-ml:
extends:
file: ../compose.base.yaml
service: base-service
container_name: immich-ml
image: ghcr.io/immich-app/immich-machine-learning:release
user: ${NASCOMPOSE_UID?}:${NASCOMPOSE_GID?}
volumes:
- ./volumes/immich_ml_cache/:/cache/
- ./volumes/immich_ml_config/:/.config/
immich-redis:
extends:
file: ../compose.base.yaml
service: base-service
container_name: immich-redis
image: redis:6.2-alpine
healthcheck:
test: redis-cli ping || exit 1
user: ${NASCOMPOSE_UID?}:${NASCOMPOSE_GID?}
volumes:
- ./volumes/redis_data/:/data/
immich-postgres:
extends:
file: ../compose.base.yaml
service: base-service
container_name: immich-postgres
image: tensorchord/pgvecto-rs:pg14-v0.2.0
user: ${NASCOMPOSE_UID?}:${NASCOMPOSE_GID?}
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: immich
POSTGRES_INITDB_ARGS: --data-checksums
volumes:
- ./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
networks:
reverse-proxy:
external: true
smtp-server:
external: true