- Add database healthcheck & webapp service depencies.

This commit is contained in:
AlkorZ3 committed 2024-10-29 08:51:33 +01:00
1 parent 04262b54e9
commit 50691ad48b
2 files changed
+16 -1

No files matched your search

+14
View File
@@ -20,6 +20,12 @@ services:
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRESQL_USER} -d ${POSTGRESQL_DATABASE}'"]
interval: 10s
timeout: 3s
retries: 3
volumes:
- ./var/lib/mysql:/var/lib/mysql
@@ -46,6 +52,10 @@ services:
restart: unless-stopped
depends_on:
database:
condition: service_healthy
environment:
APACHE_UID: ${APACHE_UID}
APACHE_GID: ${APACHE_GID}
@@ -75,6 +85,10 @@ services:
restart: unless-stopped
depends_on:
database:
condition: service_healthy
environment:
APACHE_UID: ${APACHE_UID}
APACHE_GID: ${APACHE_GID}