From bb920407f37ad4b09c6ce39312ab9f271916132a Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 26 Nov 2022 17:18:31 +0100 Subject: [PATCH] Add depends_on conditions to Mastodon --- roles/docker/tasks/services/mastodon.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/roles/docker/tasks/services/mastodon.yml b/roles/docker/tasks/services/mastodon.yml index baeea09..92f11a7 100644 --- a/roles/docker/tasks/services/mastodon.yml +++ b/roles/docker/tasks/services/mastodon.yml @@ -63,8 +63,10 @@ # prettier-ignore test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] depends_on: - - db - - redis + db: + condition: "service_healthy" + redis: + condition: "service_healthy" volumes: - "{{ services.mastodon.volume_folder }}/mastodon_data:/mastodon/public/system" environment: @@ -88,8 +90,10 @@ ports: - '127.0.0.1:4000:4000' depends_on: - - db - - redis + db: + condition: "service_healthy" + redis: + condition: "service_healthy" environment: VIRTUAL_HOST: "{{ services.mastodon.domain }}" VIRTUAL_PORT: "4000" @@ -103,8 +107,10 @@ environment: DB_POOL: 32 depends_on: - - db - - redis + db: + condition: "service_healthy" + redis: + condition: "service_healthy" networks: - postfix - external_services @@ -120,4 +126,4 @@ postfix: external: true internal_network: - internal: true \ No newline at end of file + internal: true