119 lines
3.5 KiB
YAML
119 lines
3.5 KiB
YAML
name: immich
|
|
|
|
services:
|
|
server:
|
|
image: ghcr.io/immich-app/immich-server:v1.131.3
|
|
container_name: immich_server
|
|
# extends:
|
|
# file: hwaccel.transcoding.yml
|
|
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
|
|
user: 10002:10002
|
|
depends_on:
|
|
- redis
|
|
- db
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
disable: false
|
|
volumes:
|
|
- photos:/usr/src/app/upload
|
|
- /etc/localtime:/etc/localtime:ro
|
|
#ports:
|
|
#- 2283:2283
|
|
networks:
|
|
- internal
|
|
- proxy
|
|
environment:
|
|
DB_HOSTNAME: db
|
|
DB_DATABASE_NAME_FILE: /run/secrets/db_name
|
|
DB_USERNAME_FILE: /run/secrets/db_user
|
|
DB_PASSWORD_FILE: /run/secrets/db_pass
|
|
secrets:
|
|
- db_name
|
|
- db_user
|
|
- db_pass
|
|
|
|
|
|
machine-learning:
|
|
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
|
|
# Example tag: ${IMMICH_VERSION:-release}-cuda
|
|
image: ghcr.io/immich-app/immich-machine-learning:v1.131.3
|
|
container_name: immich_machine_learning
|
|
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
|
|
# file: hwaccel.ml.yml
|
|
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
disable: false
|
|
volumes:
|
|
- model-cache:/cache
|
|
networks:
|
|
- internal
|
|
|
|
redis:
|
|
container_name: immich_redis
|
|
image: docker.io/redis:7.4-alpine@sha256:02419de7eddf55aa5bcf49efb74e88fa8d931b4d77c07eff8a6b2144472b6952
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: redis-cli ping || exit 1
|
|
networks:
|
|
- internal
|
|
|
|
db:
|
|
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
|
|
container_name: immich_db_pg14
|
|
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
|
|
healthcheck:
|
|
test: [ CMD-SHELL,
|
|
"pg_isready -d `cat $$POSTGRES_DB_FILE` -U `cat $$POSTGRES_USER_FILE` || exit 1;",
|
|
"Chksum=$$(psql -d `cat $$POSTGRES_DB_FILE` -U `cat $$POSTGRES_USER_FILE` --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
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
environment:
|
|
POSTGRES_DB_FILE: /run/secrets/db_name
|
|
POSTGRES_USER_FILE: /run/secrets/db_user
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_pass
|
|
POSTGRES_INITDB_ARGS: '--data-checksums'
|
|
secrets:
|
|
- db_name
|
|
- db_user
|
|
- db_pass
|
|
|
|
volumes:
|
|
model-cache:
|
|
name: immich_model_cache
|
|
db:
|
|
name: immich_db
|
|
photos:
|
|
name: immich_photos
|
|
driver_opts:
|
|
type: "nfs"
|
|
o: "addr=data.akumatic.eu,nfsvers=4"
|
|
device: ":/mnt/data/services/photos"
|
|
|
|
networks:
|
|
internal:
|
|
name: immich-internal
|
|
proxy:
|
|
name: proxy-immich
|
|
external: true
|
|
|
|
secrets:
|
|
db_name:
|
|
file: /srv/docker/secrets/immich/db/name.txt
|
|
db_user:
|
|
file: /srv/docker/secrets/immich/db/user.txt
|
|
db_pass:
|
|
file: /srv/docker/secrets/immich/db/pass.key
|