Specify restart policy for services
This commit is contained in:
parent
687b1ffa03
commit
11f0325367
12 changed files with 15 additions and 5 deletions
|
@ -51,6 +51,7 @@
|
|||
- /etc/letsencrypt/live/comfycamp.space/fullchain.pem:/certs/comfycamp.space/fullchain.pem:ro
|
||||
- /etc/letsencrypt/live/comfycamp.space/privkey.pem:/certs/comfycamp.space/privkey.pem:ro
|
||||
env_file: /etc/authentik/.env
|
||||
restart_policy: unless-stopped
|
||||
loop: ["1", "2"]
|
||||
- name: Run authentik worker container
|
||||
become: true
|
||||
|
@ -67,6 +68,7 @@
|
|||
- authentik-templates:/templates
|
||||
- authentik-certs:/certs
|
||||
env_file: /etc/authentik/.env
|
||||
restart_policy: unless-stopped
|
||||
- name: Run authentik LDAP outpost
|
||||
become: true
|
||||
community.docker.docker_container:
|
||||
|
@ -82,4 +84,5 @@
|
|||
env:
|
||||
AUTHENTIK_HOST: http://authentik-{{ item }}:9000
|
||||
AUTHENTIK_TOKEN: "{{ ldap_outpost_token }}"
|
||||
restart_policy: unless-stopped
|
||||
loop: ["1", "2"]
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
image: coturn/coturn:4.6.2-bookworm
|
||||
command: ["-c", "/etc/coturn/server.conf"]
|
||||
network_mode: host
|
||||
restart_policy: unless-stopped
|
||||
volumes:
|
||||
- /etc/coturn:/etc/coturn:ro
|
||||
mounts:
|
||||
- type: tmpfs
|
||||
target: /var/lib/coturn
|
||||
recreate: "{{ turnconf.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -45,5 +45,5 @@
|
|||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "8022:8022"
|
||||
restart_policy: unless-stopped
|
||||
recreate: "{{ appini.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
- name: immich
|
||||
- name: postgresql
|
||||
recreate: "{{ cfg.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
- name: Start immich machine learning container
|
||||
become: true
|
||||
community.docker.docker_container:
|
||||
|
@ -63,3 +64,4 @@
|
|||
- name: immich
|
||||
- name: postgresql
|
||||
recreate: "{{ cfg.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
- /etc/letsencrypt/live/{{ domain }}/fullchain.pem:/etc/tls/fullchain.pem:ro
|
||||
- /etc/letsencrypt/live/{{ domain }}/privkey.pem:/etc/tls/privkey.pem:ro
|
||||
recreate: "{{ maddy_conf.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
- name: Get users
|
||||
become: true
|
||||
community.docker.docker_container_exec:
|
||||
|
|
|
@ -11,3 +11,4 @@
|
|||
DATA_SOURCE_URI: postgresql:5432/exporter?sslmode=disable
|
||||
DATA_SOURCE_USER: exporter
|
||||
DATA_SOURCE_PASS: "{{ postgresql_exporter_password }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -31,3 +31,4 @@
|
|||
- prometheus:/prometheus
|
||||
- /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
recreate: "{{ prometheus_cfg.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
- nextcloud:/var/www/html
|
||||
- /mnt/hdd/nextcloud/data:/var/www/html/data
|
||||
recreate: "{{ cfg.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
loop: [1]
|
||||
- name: Schedule background jobs
|
||||
become: true
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: postgres
|
||||
POSTGRES_PASSWORD: "{{ users.postgres }}"
|
||||
restart_policy: unless-stopped
|
||||
recreate: "{{ pgconf.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
- name: Create a function to manage users
|
||||
become: true
|
||||
community.docker.docker_container_exec:
|
||||
|
|
|
@ -58,3 +58,4 @@
|
|||
- "{{ tls_cert_path }}:/etc/tls/fullchain.pem:ro"
|
||||
- "{{ tls_key_path }}:/etc/tls/privkey.pem:ro"
|
||||
recreate: "{{ cfg.changed or tls_cert_state.changed or tls_key_state.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -46,5 +46,5 @@
|
|||
networks:
|
||||
- name: postgresql
|
||||
- name: haproxy
|
||||
restart_policy: unless-stopped
|
||||
recreate: "{{ serverconf.changed or logconf.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
|
@ -53,5 +53,5 @@
|
|||
volumes:
|
||||
- /etc/tor:/etc/tor:ro
|
||||
- /var/lib/tor:/var/lib/tor
|
||||
restart_policy: unless-stopped
|
||||
recreate: "{{ torrc.changed or tor_files.changed }}"
|
||||
restart_policy: unless-stopped
|
||||
|
|
Loading…
Reference in a new issue