services:
immich-server:
image: ghcr.io/immich-app/immich-server:release
container_name: immich_server
restart: unless-stopped
cpus: 1.0
ports:
- "2283:2283"
environment:
- TZ=Asia/Shanghai
- DB_HOSTNAME=immich_postgres
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_DATABASE_NAME=immich
- REDIS_HOSTNAME=immich_redis
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- /vol2/1000/photos:/photos:ro
- /vol1/1000/256solid/immichmodel/sql:/usr/src/app/upload
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu,video]
depends_on:
- immich_postgres
- immich_machine_learning
- immich_redis
immich_machine_learning:
image: ghcr.io/immich-app/immich-machine-learning:release-cuda
container_name: immich_ml
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- /vol1/1000/256solid/immichmodel:/cache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
immich_redis:
image: redis:alpine
container_name: immich_redis
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
immich_postgres:
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.2-pgvectors0.2.0
container_name: immich_postgres
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=immich
- TZ=Asia/Shanghai
volumes:
- /vol1/1000/256solid/immichmodel/immichsql:/var/lib/postgresql/data