feat: mariadb healthcheck + wildfly using external db
This commit is contained in:
parent
1fe9817bd2
commit
0345b6826a
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,5 +5,5 @@
|
|||
build
|
||||
bin
|
||||
|
||||
# Ignore mariadb volume directory
|
||||
# Ignore docker volume directory
|
||||
mariadb
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue