User Tools

Site Tools


docker-compose
version: "3" # Use version 3 of the docker-compose file format

# Service definitions for the big-bear-immich application
services:
  # Main Immich Server service configuration
  immich-server:
    container_name: immich-server # Name of the running container
    image: ghcr.io/immich-app/immich-server:v1.125.7 # Image to be used
    ports: # Mapping ports from the host OS to the container
      - 2283:2283
    volumes: # Mounting directories for persistent data storage
      - immich_upload:/usr/src/app/upload
    environment: # Setting environment variables
      DB_HOSTNAME: immich-postgres
      DB_USERNAME: portainer
      DB_PASSWORD: portainer
      DB_DATABASE_NAME: immich
      DB_PORT: 5432
      REDIS_HOSTNAME: immich-redis
      IMMICH_MACHINE_LEARNING_URL: http://immich-machine-learning:3003
    depends_on: # Dependencies to ensure the order of service startup
      - redis
      - database
    restart: always # Policy to always restart the container if it stops
    networks:
      - immich-network

  # Configuration for Immich Machine Learning service
  immich-machine-learning:
    container_name: immich-machine-learning # Name of the running container
    image: ghcr.io/immich-app/immich-machine-learning:v1.125.7 # Image to be used
    volumes: # Mounting directories for persistent data storage
      - immich_cache:/cache
    environment: # Setting environment variables
      DB_HOSTNAME: immich-postgres
      DB_USERNAME: portainer
      DB_PASSWORD: portainer
      DB_DATABASE_NAME: immich
      DB_PORT: 5432
      REDIS_HOSTNAME: immich-redis
    restart: always # Policy to always restart the container if it stops
    networks:
      - immich-network

  # Configuration for Redis service
  redis:
    container_name: immich-redis # Name of the running container
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 # Image to be used
    restart: always # Policy to always restart the container if it stops
    networks:
      - immich-network

  # Configuration for Database service
  database:
    container_name: immich-postgres # Name of the running container
    image: tensorchord/pgvecto-rs:pg14-v0.2.0 # Image to be used
    environment: # Setting environment variables
      POSTGRES_PASSWORD: portainer
      POSTGRES_USER: portainer
      POSTGRES_DB: immich
      PG_DATA: /var/lib/postgresql/data
    volumes: # Mounting directories for persistent data storage
      - immich_postgres:/var/lib/postgresql/data
    restart: always # Policy to always restart the container if it stops
    networks:
      - immich-network

# Network definitions
networks:
  # Define the network
  immich-network:
    # Use the bridge driver
    driver: bridge

# Define named volumes for data persistence.
volumes:
  # Define a named volume for Immich data.
  immich_cache:
    # Use the local storage driver.
    driver: local
  immich_upload:
    # Use the local storage driver.
    driver: local
  immich_postgres:
    # Use the local storage driver.
    driver: local
docker-compose.txt · Last modified: 2025/02/08 13:14 by 192.168.1.82