- Add database healthcheck & webapp service depencies.
This commit is contained in:
parent
04262b54e9
commit
50691ad48b
@ -3,7 +3,8 @@ Rx3/Ampache-Mga9 V 1.2.3 - A. GIBERT - 2024/10/xx
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Fix crontab: user ampache user instead of root and add it to git,
|
||||
- Fix database restart in compose file.
|
||||
- Fix database restart in compose file,
|
||||
- Add database healthcheck & webapp service depencies.
|
||||
|
||||
|
||||
|
||||
|
14
compose.yaml
14
compose.yaml
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user