feat: mariadb healthcheck + wildfly using external db

This commit is contained in:
Laureηt 2022-04-21 13:48:31 +02:00
parent 1fe9817bd2
commit 0345b6826a
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
2 changed files with 14 additions and 1 deletions

2
.gitignore vendored
View file

@ -5,5 +5,5 @@
build
bin
# Ignore mariadb volume directory
# Ignore docker volume directory
mariadb

View file

@ -12,6 +12,11 @@ services:
- ./build/libs/:/opt/jboss/wildfly/standalone/deployments/
environment:
- WILDFLY_PASSWORD=password
- DB_PORT=3306
- DB_HOST=mariadb
depends_on:
mariadb:
condition: service_healthy
restart: always
mariadb:
@ -27,6 +32,14 @@ services:
- 3306:3306
volumes:
- ./mariadb/:/var/lib/mysql/
healthcheck:
test:
[
"CMD-SHELL",
'mysqladmin -p$$MYSQL_ROOT_PASSWORD -h localhost ping | grep "mysqld is alive" || exit 1',
]
interval: 2s
retries: 10
restart: always
volumes: