Saltar a contenido

Immich

Backup y gestión de fotos/videos auto-hospedado, alternativa a Google Photos. Stack con servidor, ML, PostgreSQL y Redis compartido.

📁 Rutas y configs

Qué Dónde
Compose /opt/docker/immich/docker-compose.yml
Variables de entorno /opt/docker/immich/.env
Upload location Definido por UPLOAD_LOCATION en .env; actualmente /mnt/ssd_512/immich/library
DB data /opt/docker/immich/postgres/ (permanece fuera del SSD dedicado)

Contenedores: immich_server, immich_machine_learning, immich_postgres, shared_redis Puerto: 8503

Compose

name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 127.0.0.1:8503:2283
    depends_on:
      - database
    restart: always
    networks:
      - immich_net
      - shared_net
    environment:
      REDIS_HOSTNAME: shared_redis
      REDIS_DB: 0

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    networks:
      - immich_net

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: --data-checksums
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always
    networks:
      - immich_net

volumes:
  model-cache: null
networks:
  immich_net:
    external: true
  shared_net:
    external: true

immich-server se conecta a shared_net y define REDIS_HOSTNAME: shared_redis con REDIS_DB: 0. El servidor, ML y PostgreSQL se conectan a immich_net.