This commit is contained in:
blu 2024-03-18 12:55:01 +01:00
parent 2e34b2f16a
commit 8e807049d6
Signed by: blu
GPG Key ID: 9DF47BD2E647A7D6
1 changed files with 20 additions and 6 deletions

View File

@ -18,12 +18,13 @@ services:
- DB_PASSWORD_FILE = /run/secrets/db_password
secrets:
- db_password
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/fpm-ping"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
# TODO: activate health check when done with debug
# healthcheck:
# test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/fpm-ping"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 1m
deploy:
update_config:
failure_action: rollback
@ -44,11 +45,24 @@ services:
environment:
- MYSQL_DATABASE=open-inventory
- MYSQL_USER=open-inventory
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- FILE__MYSQL_PASSWORD=/run/secrets/db_password
# TODO: remove next line! it's just a test password for debug
# - MYSQL_PASSWORD="undamaged-cheesy-lapdog-pregame-lively-class"
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
- FILE__MYSQL_ROOT_PASSWORD=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
# TODO: activate health check when done with debug
# healthcheck:
# test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
# interval: 30s
# timeout: 30s
# retries: 3
# start_period: 1m
deploy:
labels: [ 'coop-cloud.${STACK_NAME}.db.version=10.5-31e52f4d87a' ]
networks: