Files
nas-tools/immich/docker-compose.yml
T
Gan, Jimmy 835c7b5fc0
Run Tests / Frontend Tests (push) Has been cancelled
Run Tests / Test Summary (push) Has been cancelled
Run Tests / Backend Tests (push) Has started running
Deploy Dashboard (Dev) / deploy-dev (push) Has been cancelled
fix: restore dashboard dev CI and Immich mobile uploads
- Change deploy-dev workflow runner from ubuntu-latest to nas
  Fixes: CI failing to access /volume1/docker paths

- Add missing immich-machine-learning service to compose
  Fixes: Mobile photo uploads failing due to ML model download timeouts
  - Add 10min timeout for model downloads (MACHINE_LEARNING_REQUEST_TIMEOUT=600)
  - Add 4GB memory limit to prevent OOM during model loading
  - Mount model-cache volume for persistent model storage
  - Add health check and proper logging

Impact: Restores dev deployment pipeline and mobile photo backup functionality
2026-04-06 00:42:58 +08:00

110 lines
2.8 KiB
YAML

services:
immich-server:
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
container_name: immich-server
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "0.0.0.0:2283:2283"
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /volume1/photo:/mnt/photo:ro
- /volume1/homes/zjgump/Photos:/mnt/synology-photos:ro
- /etc/localtime:/etc/localtime:ro
environment:
DB_HOSTNAME: immich-db
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE_NAME: ${DB_DATABASE_NAME}
REDIS_HOSTNAME: immich-redis
IMMICH_MACHINE_LEARNING_URL: http://immich-machine-learning:3003
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:2283/api/server/ping || exit 1"]
interval: 30s
timeout: 5s
retries: 3
depends_on:
- immich-redis
- immich-db
networks:
- immich
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
immich-redis:
image: redis:7-alpine
container_name: immich-redis
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
healthcheck:
test: redis-cli ping || exit 1
networks:
- immich
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
immich-db:
image: tensorchord/pgvecto-rs:pg16-v0.2.0
container_name: immich-db
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: "--data-checksums"
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1
interval: 30s
timeout: 5s
retries: 5
networks:
- immich
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
container_name: immich-machine-learning
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- /volume1/docker/immich/model-cache:/cache
environment:
- MACHINE_LEARNING_CACHE_FOLDER=/cache
- MACHINE_LEARNING_REQUEST_TIMEOUT=600
deploy:
resources:
limits:
memory: 4G
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3003/ping || exit 1"]
interval: 30s
timeout: 5s
retries: 3
networks:
- immich
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
immich: