/
/
/
Ansible role that deployes services on my runner machine
1services:
2 immich-server:
3 container_name: immich-server
4 image: {{ container_images.immich_server }}:${IMMICH_VERSION:-release}
5{% if gpu_enabled %}
6 gpus: all
7{% endif %}
8 volumes:
9 - ${UPLOAD_LOCATION}:/data
10{% for lib in immich_external_libraries | default([]) %}
11 - {{ lib.host_path }}:{{ lib.container_path }}
12{% endfor %}
13 - {{ immich_config_dir }}/config:/config:ro
14 - /etc/localtime:/etc/localtime:ro
15 env_file:
16 - .env
17 ports:
18 - "{{ immich_server_port }}:2283"
19 depends_on:
20 - redis
21 - database
22 restart: always
23
24 immich-machine-learning:
25 container_name: immich-machine-learning
26{% if gpu_enabled %}
27 image: {{ container_images.immich_machine_learning }}:${IMMICH_VERSION:-release}-cuda
28 gpus: all
29{% else %}
30 image: {{ container_images.immich_machine_learning }}:${IMMICH_VERSION:-release}
31{% endif %}
32 volumes:
33 - model-cache:/cache
34 env_file:
35 - .env
36 restart: unless-stopped
37
38 redis:
39 container_name: immich-redis
40 image: {{ container_images.valkey }}
41 healthcheck:
42 test: ["CMD-SHELL", "redis-cli ping || exit 1"]
43 restart: always
44
45 database:
46 container_name: immich-postgres
47 image: {{ container_images.immich_postgres }}
48 environment:
49 POSTGRES_PASSWORD: ${DB_PASSWORD}
50 POSTGRES_USER: ${DB_USERNAME}
51 POSTGRES_DB: ${DB_DATABASE_NAME}
52 POSTGRES_INITDB_ARGS: "--data-checksums"
53 volumes:
54 - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
55 shm_size: 128mb
56 restart: always
57
58volumes:
59 model-cache:
60