Immich – Production Docker Compose (Johannes)
Johannes RTX 4070 64 GB RAM HAProxy Backend
Note: This compose file is designed for Johannes as a production Immich node behind HAProxy. No ports are exposed directly; HAProxy terminates TLS and forwards traffic to the Immich server container. GPU is reserved for the
immich-machine-learning container only.Environment expectations
- .env file present next to
docker-compose.yml - Contains at least:
DB_USERNAMEDB_PASSWORDDB_DATABASE_NAMEIMMICH_VERSION(e.g.v1.105.0orrelease)
- HAProxy points to
immich-serveron port2283(internal only)
docker-compose.yml
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
depends_on:
- redis
- database
env_file:
- .env
volumes:
# Main Immich upload storage (bind this to your real storage on Johannes if desired)
- immich_upload:/usr/src/app/upload
# No ports exposed here; HAProxy will connect to this container on the internal Docker network.
restart: always
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
env_file:
- .env
volumes:
# Cache for ML models (keeps downloads and optimizations between restarts)
- model-cache:/cache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
restart: always
redis:
container_name: immich_redis
image: redis:7
restart: always
database:
container_name: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.2.0
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
volumes:
immich_upload:
pgdata:
model-cache:
Johannes-specific notes
- Ingress: HAProxy backend should target
immich_server:2283on the Docker network. - Storage: For production, you can replace:
immich_upload:/usr/src/app/upload
with a bind mount, e.g.:/srv/immich/upload:/usr/src/app/upload - GPU: Only the ML container needs GPU; server stays CPU-only for stability and clarity.
- Backups: Snapshot or back up
pgdataandimmich_uploadregularly.
Optional: test version for Signal Raider / MSI
If you want a quick test variant for Signal Raider or MSI with direct port exposure, you can temporarily add:
ports:
- "2283:2283"
under immich-server, then remove it again for Johannes.
نظری یافت نشد