Files
immich/docker-compose.yml
T

92 lines
3.0 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
services:
immich-server:
mem_limit: 1.5g
memswap_limit: 2g
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:?Set IMMICH_VERSION}
extends:
file: hwaccel.transcoding.yml
service: vaapi # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
- /data/Data1/immich/library:/data
- /etc/localtime:/etc/localtime:ro
env_file:
- /srv/docker/secrets/immich/.env
depends_on:
- redis
- database
restart: unless-stopped
healthcheck:
disable: false
networks:
npm_proxy:
ipv4_address: 192.168.97.19
immich_internal:
immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:?Set IMMICH_VERSION}-openvino
extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
file: hwaccel.ml.yml
service: openvino # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- /srv/appdata/immich/model-cache:/cache
env_file:
- /srv/docker/secrets/immich/.env
environment:
- IMMICH_LOG_LEVEL=debug
- MACHINE_LEARNING_MODEL_REVISION=v2
restart: unless-stopped
healthcheck:
disable: false
networks:
- immich_internal
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571
healthcheck:
test: redis-cli ping || exit 1
restart: unless-stopped
volumes:
- /srv/appdata/immich/redis:/data
networks:
- immich_internal
database:
mem_limit: 1.5g
memswap_limit: 2.5g
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:41eacbe83eca995561fe43814fd4891e16e39632806253848efaf04d3c8a8b84
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD:?Set DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME:?Set DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME:?Set DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- /srv/appdata/immich/postgres:/var/lib/postgresql/data
shm_size: 128mb
restart: unless-stopped
networks:
- immich_internal
networks:
npm_proxy:
external: true
immich_internal:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1420