/
/
/
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 volumes:
6 - ${UPLOAD_LOCATION}:/data
7 - {{ immich_config_dir }}/config:/config:ro
8 - /etc/localtime:/etc/localtime:ro
9{% for lib in immich_external_libraries | default([]) %}
10 - {{ lib.host_path }}:{{ lib.container_path }}:ro
11{% endfor %}
12 env_file:
13 - .env
14 ports:
15 - "{{ immich_server_port }}:2283"
16 depends_on:
17 - redis
18 - database
19{% if gpu_enabled %}
20 deploy:
21 resources:
22 reservations:
23 devices:
24 - driver: nvidia
25 count: all
26 capabilities: [gpu]
27{% endif %}
28 restart: always
29
30 immich-machine-learning:
31 container_name: immich-machine-learning
32{% if gpu_enabled %}
33 image: {{ container_images.immich_machine_learning_cuda }}:${IMMICH_VERSION:-release}
34 deploy:
35 resources:
36 reservations:
37 devices:
38 - driver: nvidia
39 count: all
40 capabilities: [gpu]
41{% else %}
42 image: {{ container_images.immich_machine_learning }}:${IMMICH_VERSION:-release}
43{% endif %}
44 volumes:
45 - model-cache:/cache
46 env_file:
47 - .env
48 restart: unless-stopped
49
50 redis:
51 container_name: immich-redis
52 image: {{ container_images.valkey }}
53 healthcheck:
54 test: ["CMD-SHELL", "redis-cli ping || exit 1"]
55 restart: always
56
57 database:
58 container_name: immich-postgres
59 image: {{ container_images.immich_postgres }}
60 environment:
61 POSTGRES_PASSWORD: ${DB_PASSWORD}
62 POSTGRES_USER: ${DB_USERNAME}
63 POSTGRES_DB: ${DB_DATABASE_NAME}
64 POSTGRES_INITDB_ARGS: "--data-checksums"
65 volumes:
66 - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
67 shm_size: 128mb
68 restart: always
69
70volumes:
71 model-cache:
72