-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathimmich.yml
120 lines (108 loc) · 4.36 KB
/
immich.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
- hosts: homelab
vars:
application: immich
docker_network: "{{ networks.pub }}"
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_group }}"
mode: "0771"
- name: Create redis container
ansible.builtin.include_role:
name: redis
vars:
redis_version: 7
redis_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
35623530313433376535366161386234616565376361306239316436623034636432613436336137
3961346334623632333534353038616339383730333635650a303336386631356464353234356562
36393965326635353238323365393865326439363830383733663162663162326238383532313438
6362343564346366350a353861373539636438323231386333326466353364316662353430383730
66623361316230663431303761663530383034633533323363333866643166623632
- name: Create postgres container
ansible.builtin.import_role:
name: postgres
vars:
postgres_image: tensorchord/pgvecto-rs
postgres_version: pg15-v0.2.0
postgres_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
39386239373632396266303736376262626638666636666637643566653161633361376138626637
6536643137316363373433326530373531323532653461390a643931366661383563343636363638
66383837613864643134316230353764323965313833666632356330313161383630306636613064
6237663938316164370a343734613964356231636462623536323066616138363532373265336439
63366338393162616361346139303364643263663261346266393435313165343834
- name: Create server container
ansible.builtin.include_role:
name: docker_container
vars:
name: "{{ application }}-server"
image: ghcr.io/immich-app/immich-server:v1.125.7
env: &immich_shared_env
DB_HOSTNAME: "{{ _postgres_hostname }}"
DB_PORT: "{{ _postgres_port | string }}"
DB_USERNAME: "{{ _postgres_username }}"
DB_PASSWORD: "{{ _postgres_password }}"
DB_DATABASE_NAME: "{{ _postgres_database }}"
REDIS_HOSTNAME: "{{ _redis_hostname }}"
REDIS_PORT: "{{ _redis_port | string }}"
REDIS_PASSWORD: "{{ _redis_password }}"
UPLOAD_LOCATION: "/usr/src/app/upload"
LOG_LEVEL: "log"
NVIDIA_DRIVER_CAPABILITIES: all
TZ: "{{ common_timezone }}"
volumes:
- &immich_upload_volume "{{ common_directory_photos }}/Immich:/usr/src/app/upload"
- &immich_localtime_volume /etc/localtime:/etc/localtime:ro
device_requests:
- driver: nvidia
count: -1
device_ids: []
options: {}
capabilities:
- - gpu
- video
- compute
- utility
traefik:
- port: 2283
rule: Host(`{{ application }}.{{ common_tld }}`)
homepage:
group: Favourites
weight: 150
description: "Photo & Video Backup"
widget:
version: 2
key: !vault |
$ANSIBLE_VAULT;1.1;AES256
35353165356338663039616161303033663337316662353462346437383838303563323433643730
3261306631623564386263613764323861333239643162350a663539633632353939373265666335
33303364343462333937323831633133623534383539656234623036323662383666323031353932
3931623363353562360a386164666166393035343233333838346466386639326465616261363063
63366336313835626133346365306236626336656132633235313365386335326533376330633865
6362326364633466656238633135313362303033306136336337
fields: '["photos", "videos", "storage"]'
- name: Create machine-learning container
ansible.builtin.include_role:
name: docker_container
vars:
name: "{{ application }}-machine-learning"
image: ghcr.io/immich-app/immich-machine-learning:v1.125.7-cuda
device_requests:
- driver: nvidia
count: -1
device_ids: []
options: {}
capabilities:
- - gpu
- video
- compute
- utility
env: *immich_shared_env
volumes:
- *immich_upload_volume
- "{{ config_directory }}/ml-cache:/cache"