112 lines
4.0 KiB
YAML
112 lines
4.0 KiB
YAML
|
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.94.1 # Image to be used
|
||
|
command: ["start.sh", "immich"] # Command to be executed upon container start
|
||
|
ports: # Mapping ports from the host OS to the container
|
||
|
- 2283:3001
|
||
|
volumes: # Mounting directories for persistent data storage
|
||
|
- immich_upload:/usr/src/app/upload
|
||
|
environment: # Setting environment variables
|
||
|
DB_HOSTNAME: immich-postgres
|
||
|
DB_USERNAME: dockge
|
||
|
DB_PASSWORD: dockge
|
||
|
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 the Immich Microservices
|
||
|
immich-microservices:
|
||
|
container_name: immich-microservices # Name of the running container
|
||
|
image: ghcr.io/immich-app/immich-server:v1.94.1 # Image to be used
|
||
|
# extends: # Feature to use configuration from another service (currently commented out)
|
||
|
# file: hwaccel.yml
|
||
|
# service: hwaccel
|
||
|
command: ["start.sh", "microservices"] # Command to be executed upon container start
|
||
|
volumes: # Mounting directories for persistent data storage
|
||
|
- immich_upload:/usr/src/app/upload
|
||
|
environment: # Setting environment variables
|
||
|
DB_HOSTNAME: immich-postgres
|
||
|
DB_USERNAME: dockge
|
||
|
DB_PASSWORD: dockge
|
||
|
DB_DATABASE_NAME: immich
|
||
|
DB_PORT: 5432
|
||
|
REDIS_HOSTNAME: immich-redis
|
||
|
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.94.1 # Image to be used
|
||
|
volumes: # Mounting directories for persistent data storage
|
||
|
- immich_cache:/cache
|
||
|
environment: # Setting environment variables
|
||
|
DB_HOSTNAME: immich-postgres
|
||
|
DB_USERNAME: dockge
|
||
|
DB_PASSWORD: dockge
|
||
|
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.1.11 # Image to be used
|
||
|
environment: # Setting environment variables
|
||
|
POSTGRES_PASSWORD: dockge
|
||
|
POSTGRES_USER: dockge
|
||
|
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
|