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
|
build
|
||||||
bin
|
bin
|
||||||
|
|
||||||
# Ignore mariadb volume directory
|
# Ignore docker volume directory
|
||||||
mariadb
|
mariadb
|
||||||
|
|
|
@ -12,6 +12,11 @@ services:
|
||||||
- ./build/libs/:/opt/jboss/wildfly/standalone/deployments/
|
- ./build/libs/:/opt/jboss/wildfly/standalone/deployments/
|
||||||
environment:
|
environment:
|
||||||
- WILDFLY_PASSWORD=password
|
- WILDFLY_PASSWORD=password
|
||||||
|
- DB_PORT=3306
|
||||||
|
- DB_HOST=mariadb
|
||||||
|
depends_on:
|
||||||
|
mariadb:
|
||||||
|
condition: service_healthy
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
|
@ -27,6 +32,14 @@ services:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
volumes:
|
volumes:
|
||||||
- ./mariadb/:/var/lib/mysql/
|
- ./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
|
restart: always
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in a new issue