2023-11-18 18:43:10 +01:00
#
2025-02-17 04:28:59 +01:00
# 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:
2023-11-18 18:43:10 +01:00
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
2023-11-18 18:49:30 +01:00
# The compose file on main may not be compatible with the latest release.
2023-11-18 18:43:10 +01:00
2023-11-10 15:43:21 +13:00
name : immich
2022-02-03 14:42:27 -06:00
services :
2022-05-08 07:07:58 -05:00
immich-server :
2022-12-30 17:30:28 +01:00
container_name : immich_server
2023-05-30 21:53:24 -04:00
image : ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
2024-05-27 17:04:07 -04:00
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
2022-02-03 14:42:27 -06:00
volumes :
2024-07-29 22:24:47 -04:00
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
2022-02-11 22:23:06 -06:00
- ${UPLOAD_LOCATION}:/usr/src/app/upload
2023-10-03 03:50:27 +02:00
- /etc/localtime:/etc/localtime:ro
2022-02-03 14:42:27 -06:00
env_file :
- .env
2023-11-17 23:13:36 -05:00
ports :
2024-10-09 16:01:52 -04:00
- '2283:2283'
2022-02-03 14:42:27 -06:00
depends_on :
- redis
- database
2022-05-21 02:23:55 -05:00
restart : always
2024-08-04 14:37:43 -04:00
healthcheck :
disable : false
2022-02-03 14:42:27 -06:00
2022-06-11 16:12:06 -05:00
immich-machine-learning :
2022-12-30 17:30:28 +01:00
container_name : immich_machine_learning
2025-03-17 17:08:19 -04:00
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
2024-01-21 18:22:39 -05:00
# Example tag: ${IMMICH_VERSION:-release}-cuda
2023-05-30 21:53:24 -04:00
image : ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
2024-01-21 18:22:39 -05:00
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
2025-03-17 17:08:19 -04:00
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
2022-03-27 14:58:54 -05:00
volumes :
2023-02-18 09:13:37 -06:00
- model-cache:/cache
2022-03-27 14:58:54 -05:00
env_file :
- .env
2022-05-21 02:23:55 -05:00
restart : always
2024-08-04 14:37:43 -04:00
healthcheck :
disable : false
2022-05-21 02:23:55 -05:00
2022-02-03 14:42:27 -06:00
redis :
container_name : immich_redis
2025-04-04 18:46:46 -04:00
image : docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1
2024-05-22 05:28:12 -04:00
healthcheck :
test : redis-cli ping || exit 1
2022-05-21 02:23:55 -05:00
restart : always
2022-02-03 14:42:27 -06:00
database :
container_name : immich_postgres
2025-03-03 11:51:13 +00:00
image : docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
2022-02-03 14:42:27 -06:00
environment :
POSTGRES_PASSWORD : ${DB_PASSWORD}
POSTGRES_USER : ${DB_USERNAME}
POSTGRES_DB : ${DB_DATABASE_NAME}
2024-05-11 11:11:14 -04:00
POSTGRES_INITDB_ARGS : '--data-checksums'
2022-02-03 14:42:27 -06:00
volumes :
2024-07-29 22:24:47 -04:00
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
2024-04-08 22:11:25 +02:00
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
2024-05-22 05:28:12 -04:00
healthcheck :
2024-11-26 09:59:56 -05:00
test : >-
2025-03-18 00:04:08 +08:00
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
2024-05-22 05:28:12 -04:00
interval : 5m
start_interval : 30s
start_period : 5m
2024-11-26 09:59:56 -05:00
command : >-
2025-03-18 00:04:08 +08:00
postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
2024-05-22 05:28:12 -04:00
restart : always
2022-06-11 16:12:06 -05:00
2022-02-03 14:42:27 -06:00
volumes :
2023-02-18 09:13:37 -06:00
model-cache :