Add depends_on conditions to Mastodon

This commit is contained in:
Sam A. 2022-11-26 17:18:31 +01:00
parent 7962a75481
commit bb920407f3
Signed by untrusted user: samsapti
GPG Key ID: CBBBE7371E81C4EA
1 changed files with 13 additions and 7 deletions

View File

@ -63,8 +63,10 @@
# prettier-ignore # prettier-ignore
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
depends_on: depends_on:
- db db:
- redis condition: "service_healthy"
redis:
condition: "service_healthy"
volumes: volumes:
- "{{ services.mastodon.volume_folder }}/mastodon_data:/mastodon/public/system" - "{{ services.mastodon.volume_folder }}/mastodon_data:/mastodon/public/system"
environment: environment:
@ -88,8 +90,10 @@
ports: ports:
- '127.0.0.1:4000:4000' - '127.0.0.1:4000:4000'
depends_on: depends_on:
- db db:
- redis condition: "service_healthy"
redis:
condition: "service_healthy"
environment: environment:
VIRTUAL_HOST: "{{ services.mastodon.domain }}" VIRTUAL_HOST: "{{ services.mastodon.domain }}"
VIRTUAL_PORT: "4000" VIRTUAL_PORT: "4000"
@ -103,8 +107,10 @@
environment: environment:
DB_POOL: 32 DB_POOL: 32
depends_on: depends_on:
- db db:
- redis condition: "service_healthy"
redis:
condition: "service_healthy"
networks: networks:
- postfix - postfix
- external_services - external_services
@ -120,4 +126,4 @@
postfix: postfix:
external: true external: true
internal_network: internal_network:
internal: true internal: true