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