50 lines
1 KiB
YAML
50 lines
1 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
wildfly:
|
|
image: quay.io/wildfly/wildfly
|
|
container_name: wildfly
|
|
hostname: wildfly
|
|
ports:
|
|
- 8080:8080
|
|
- 9990:9990
|
|
volumes:
|
|
- ./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:
|
|
image: mariadb
|
|
container_name: mariadb
|
|
hostname: mariadb
|
|
environment:
|
|
- MYSQL_USER=user
|
|
- MYSQL_PASSWORD=mypassword
|
|
- MYSQL_DATABASE=mydatabase
|
|
- MYSQL_ROOT_PASSWORD=rootpassword
|
|
ports:
|
|
- 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:
|
|
wildfly_data:
|
|
driver: local
|
|
mariadb:
|
|
driver: local
|