Immich
Immich is a high-performance, self-hosted photo and video management solution designed as a Google Photos alternative. It features automatic backup from mobile devices, facial recognition, object detection, smart search powered by CLIP, reverse geocoding, and a beautiful timeline view. This stack deploys the Immich server (handling both API and microservices), a dedicated machine learning container for AI-powered features, PostgreSQL 16 with pgvecto.rs for vector similarity search, and Redis 7 for job queuing. Photos and videos are stored in a persistent volume, while ML models are cached separately for fast startup. Immich supports RAW photo formats, HEIC/HEIF, video transcoding, album sharing, external library scanning, and partner sharing. After deployment, access the web UI on port 2283 to create your admin account, then install the mobile app and configure automatic backup.
Services Inclus
immich
ghcr.io/immich-app/immich-server:release
Variables d'Environnement :
machine-learning
ghcr.io/immich-app/immich-machine-learning:release
Variables d'Environnement :
postgres
tensorchord/pgvecto-rs:pg16-v0.2.0
Variables d'Environnement :
redis
redis:7-alpine
YAML Généré
# Generated by ComposeHub (composehub.dev)
name: immich
services:
immich:
image: ghcr.io/immich-app/immich-server:release
restart: always
ports:
- 2283:2283
volumes:
- immich_upload:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
environment:
DB_HOSTNAME: postgres
DB_PORT: "5432"
DB_DATABASE_NAME: ${DB_DATABASE:-immich}
DB_USERNAME: ${DB_USERNAME:-immich}
DB_PASSWORD: ${DB_PASSWORD:-changeme}
REDIS_HOSTNAME: redis
REDIS_PORT: "6379"
IMMICH_MACHINE_LEARNING_URL: http://machine-learning:3003
TZ: ${TZ:-UTC}
networks:
- immich
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:2283/api/server/ping || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: "4.00"
memory: 2048M
reservations:
cpus: "0.50"
memory: 512M
labels:
com.composehub.description: Immich server — photo and video management with AI features
machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:release
restart: always
volumes:
- immich_ml_cache:/cache
environment:
TZ: ${TZ:-UTC}
networks:
- immich
healthcheck:
test:
- CMD-SHELL
- python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:3003/ping')" || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
deploy:
resources:
limits:
cpus: "4.00"
memory: 4096M
reservations:
cpus: "0.50"
memory: 1024M
labels:
com.composehub.description: Immich machine learning service for facial recognition and smart search
postgres:
image: tensorchord/pgvecto-rs:pg16-v0.2.0
restart: always
volumes:
- immich_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_DATABASE:-immich}
POSTGRES_USER: ${DB_USERNAME:-immich}
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
POSTGRES_INITDB_ARGS: "--data-checksums"
networks:
- immich
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${DB_USERNAME:-immich} -d ${DB_DATABASE:-immich}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.50"
memory: 1024M
reservations:
cpus: "0.25"
memory: 256M
labels:
com.composehub.description: PostgreSQL 16 with pgvecto.rs for vector similarity search
redis:
image: redis:7-alpine
restart: always
command:
- redis-server
- "--save"
- "20"
- "1"
- "--loglevel"
- warning
- "--maxmemory"
- 256mb
- "--maxmemory-policy"
- allkeys-lru
volumes:
- immich_redis:/data
networks:
- immich
healthcheck:
test:
- CMD-SHELL
- redis-cli ping | grep PONG
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
cpus: "0.50"
memory: 320M
reservations:
cpus: "0.10"
memory: 64M
labels:
com.composehub.description: Redis 7 for Immich job queue and caching
networks:
immich:
driver: bridge
volumes:
immich_upload:
driver: local
immich_ml_cache:
driver: local
immich_db:
driver: local
immich_redis:
driver: local
Informations Rapides
- Services
- 4
- Réseaux
- 1
- Volumes
- 4
Quand l'Utiliser
Ce modèle est idéal pour mettre en place un environnement immich Tous les services sont préconfigurés avec des healthchecks, des limites de ressources et des valeurs par défaut raisonnables. Personnalisez les variables d'environnement avant de déployer en production.
Conseils
- Changez tous les mots de passe par défaut avant le déploiement
- Vérifiez les limites de ressources pour votre matériel
- Ajoutez un reverse proxy pour le HTTPS en production
- Configurez des stratégies de sauvegarde pour les volumes de données