Ivan Reshetnikov
d3b27d3565
This will reduce the number of errors for users. The experiments were carried out on immich, it is not so important.
31 lines
874 B
YAML
31 lines
874 B
YAML
---
|
|
- name: Disable server in haproxy
|
|
become: true
|
|
community.general.haproxy:
|
|
socket: /run/haproxy/admin.sock
|
|
state: disabled
|
|
backend: immich
|
|
host: s{{ server_idx }}
|
|
- name: Start immich server container
|
|
become: true
|
|
community.docker.docker_container:
|
|
name: immich-{{ server_idx }}
|
|
image: ghcr.io/immich-app/immich-server:{{ tag }}
|
|
env_file: /etc/immich/_data/immich.env
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /mnt/hdd/immich:/usr/src/app/upload
|
|
- /etc/immich/_data:/etc/immich
|
|
networks:
|
|
- name: haproxy
|
|
- name: immich
|
|
- name: postgresql
|
|
recreate: "{{ cfg.changed }}"
|
|
restart_policy: unless-stopped
|
|
- name: Enable server in haproxy
|
|
become: true
|
|
community.general.haproxy:
|
|
socket: /run/haproxy/admin.sock
|
|
state: enabled
|
|
backend: immich
|
|
host: s{{ server_idx }}
|