/
/
/
1services:
2 immich-server:
3{% if gpu_enabled %}
4 container_name: immich-server
5{% else %}
6 container_name: immich_server
7{% endif %}
8 image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
9{% if gpu_enabled %}
10 gpus: all
11{% endif %}
12 volumes:
13 - ${UPLOAD_LOCATION}:/data
14 - {{ immich_config_dir }}/config:/config:ro
15 - /etc/localtime:/etc/localtime:ro
16 env_file:
17 - .env
18 ports:
19 - "{{ immich_server_port }}:2283"
20 depends_on:
21 - redis
22 - database
23{% if gpu_enabled %}
24 restart: always
25{% else %}
26 restart: unless-stopped
27{% endif %}
28
29 immich-machine-learning:
30{% if gpu_enabled %}
31 container_name: immich-machine-learning
32 image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
33 gpus: all
34{% else %}
35 container_name: immich_machine_learning
36 image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
37{% endif %}
38 volumes:
39 - model-cache:/cache
40 env_file:
41 - .env
42 restart: unless-stopped
43
44 redis:
45{% if gpu_enabled %}
46 container_name: immich-redis
47{% else %}
48 container_name: immich_redis
49{% endif %}
50 image: docker.io/valkey/valkey:8-bookworm
51 healthcheck:
52 test: ["CMD-SHELL", "redis-cli ping || exit 1"]
53 restart: always
54
55 database:
56{% if gpu_enabled %}
57 container_name: immich-postgres
58{% else %}
59 container_name: immich_postgres
60{% endif %}
61 image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
62 environment:
63 POSTGRES_PASSWORD: ${DB_PASSWORD}
64 POSTGRES_USER: ${DB_USERNAME}
65 POSTGRES_DB: ${DB_DATABASE_NAME}
66 POSTGRES_INITDB_ARGS: "--data-checksums"
67 volumes:
68 - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
69 shm_size: 128mb
70 restart: always
71
72volumes:
73 model-cache: