mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 11:07:10 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			108 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			108 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
#
 | 
						|
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
 | 
						|
#
 | 
						|
# Make sure to use the docker-compose.yml of the current release:
 | 
						|
#
 | 
						|
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
 | 
						|
#
 | 
						|
# The compose file on main may not be compatible with the latest release.
 | 
						|
 | 
						|
name: immich-prod
 | 
						|
 | 
						|
services:
 | 
						|
  immich-server:
 | 
						|
    container_name: immich_server
 | 
						|
    image: immich-server:latest
 | 
						|
    # extends:
 | 
						|
    #   file: hwaccel.transcoding.yml
 | 
						|
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
 | 
						|
    build:
 | 
						|
      context: ../
 | 
						|
      dockerfile: server/Dockerfile
 | 
						|
    environment:
 | 
						|
      - IMMICH_MEDIA_LOCATION=/data
 | 
						|
    volumes:
 | 
						|
      - ${UPLOAD_LOCATION}/photos:/data
 | 
						|
      - /etc/localtime:/etc/localtime:ro
 | 
						|
    env_file:
 | 
						|
      - .env
 | 
						|
    ports:
 | 
						|
      - 2283:2283
 | 
						|
    depends_on:
 | 
						|
      - redis
 | 
						|
      - database
 | 
						|
    restart: always
 | 
						|
    healthcheck:
 | 
						|
      disable: false
 | 
						|
 | 
						|
  immich-machine-learning:
 | 
						|
    container_name: immich_machine_learning
 | 
						|
    image: immich-machine-learning:latest
 | 
						|
    # extends:
 | 
						|
    #   file: hwaccel.ml.yml
 | 
						|
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference
 | 
						|
    build:
 | 
						|
      context: ../machine-learning
 | 
						|
      dockerfile: Dockerfile
 | 
						|
      args:
 | 
						|
        - DEVICE=cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference
 | 
						|
    ports:
 | 
						|
      - 3003:3003
 | 
						|
    volumes:
 | 
						|
      - model-cache:/cache
 | 
						|
    env_file:
 | 
						|
      - .env
 | 
						|
    restart: always
 | 
						|
    healthcheck:
 | 
						|
      disable: false
 | 
						|
 | 
						|
  redis:
 | 
						|
    container_name: immich_redis
 | 
						|
    image: docker.io/valkey/valkey:8-bookworm@sha256:facc1d2c3462975c34e10fccb167bfa92b0e0dbd992fc282c29a61c3243afb11
 | 
						|
    healthcheck:
 | 
						|
      test: redis-cli ping || exit 1
 | 
						|
    restart: always
 | 
						|
 | 
						|
  database:
 | 
						|
    container_name: immich_postgres
 | 
						|
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:5f6a838e4e44c8e0e019d0ebfe3ee8952b69afc2809b2c25f7b0119641978e91
 | 
						|
    env_file:
 | 
						|
      - .env
 | 
						|
    environment:
 | 
						|
      POSTGRES_PASSWORD: ${DB_PASSWORD}
 | 
						|
      POSTGRES_USER: ${DB_USERNAME}
 | 
						|
      POSTGRES_DB: ${DB_DATABASE_NAME}
 | 
						|
      POSTGRES_INITDB_ARGS: '--data-checksums'
 | 
						|
    volumes:
 | 
						|
      - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data
 | 
						|
    ports:
 | 
						|
      - 5432:5432
 | 
						|
    shm_size: 128mb
 | 
						|
    restart: always
 | 
						|
 | 
						|
  # set IMMICH_TELEMETRY_INCLUDE=all in .env to enable metrics
 | 
						|
  immich-prometheus:
 | 
						|
    container_name: immich_prometheus
 | 
						|
    ports:
 | 
						|
      - 9090:9090
 | 
						|
    image: prom/prometheus@sha256:63805ebb8d2b3920190daf1cb14a60871b16fd38bed42b857a3182bc621f4996
 | 
						|
    volumes:
 | 
						|
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
 | 
						|
      - prometheus-data:/prometheus
 | 
						|
 | 
						|
  # first login uses admin/admin
 | 
						|
  # add data source for http://immich-prometheus:9090 to get started
 | 
						|
  immich-grafana:
 | 
						|
    container_name: immich_grafana
 | 
						|
    command: ['./run.sh', '-disable-reporting']
 | 
						|
    ports:
 | 
						|
      - 3000:3000
 | 
						|
    image: grafana/grafana:12.0.2-ubuntu@sha256:0512d81cdeaaff0e370a9aa66027b465d1f1f04379c3a9c801a905fabbdbc7a5
 | 
						|
    volumes:
 | 
						|
      - grafana-data:/var/lib/grafana
 | 
						|
 | 
						|
volumes:
 | 
						|
  model-cache:
 | 
						|
  prometheus-data:
 | 
						|
  grafana-data:
 |