2022-05-07 14:35:50 +00:00
|
|
|
version: "2"
|
2022-04-21 07:48:10 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
wildfly:
|
2022-04-21 08:06:30 +00:00
|
|
|
container_name: wildfly
|
|
|
|
hostname: wildfly
|
2022-05-07 14:35:50 +00:00
|
|
|
image: kaaass/wildfly-mysql
|
2022-04-21 07:48:10 +00:00
|
|
|
environment:
|
2022-05-07 14:35:50 +00:00
|
|
|
- WILDFLY_DEBUG=${WILDFLY_DEBUG}
|
|
|
|
- WILDFLY_USER=${WILDFLY_ADMIN_USER}
|
|
|
|
- WILDFLY_PASS=${WILDFLY_ADMIN_PASS}
|
|
|
|
- DB_NAME=${MYSQL_DATABASE}
|
|
|
|
- DB_USER=${MYSQL_USER}
|
|
|
|
- DB_PASS=${MYSQL_PASSWORD}
|
|
|
|
- DB_URI=db:3306
|
2022-04-21 11:48:31 +00:00
|
|
|
depends_on:
|
2022-05-07 14:35:50 +00:00
|
|
|
# db:
|
|
|
|
# condition: service_healthy
|
|
|
|
- db
|
|
|
|
volumes:
|
|
|
|
- ${DEPLOYMENT_PATH}:/opt/jboss/wildfly/standalone/deployments/:rw
|
|
|
|
# - ${INIT_PATH}:/opt/jboss/wildfly/customization/init.d
|
2022-04-21 08:06:30 +00:00
|
|
|
ports:
|
2022-05-07 14:35:50 +00:00
|
|
|
- "8080:8080" # application
|
|
|
|
- "9990:9990" # admin console
|
|
|
|
- "8787:8787" # java debug
|
|
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
|
|
container_name: db
|
|
|
|
hostname: db
|
|
|
|
image: "mysql:${MYSQL_VERSION}"
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
|
|
|
- MYSQL_USER=${MYSQL_USER}
|
|
|
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
|
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
2022-04-21 08:06:30 +00:00
|
|
|
volumes:
|
2022-05-07 14:35:50 +00:00
|
|
|
# - ${DATABASE_INIT_PATH}:/docker-entrypoint-initdb.d/ # init database
|
|
|
|
- ${DATABASE_DATA_PATH}:/var/lib/mysql/ # data storage
|
|
|
|
ports:
|
|
|
|
- "13306:3306"
|
|
|
|
# cap_add:
|
|
|
|
# - SYS_NICE
|
|
|
|
# healthcheck:
|
|
|
|
# test:
|
|
|
|
# [
|
|
|
|
# "CMD-SHELL",
|
|
|
|
# 'mysqladmin -p$$MYSQL_ROOT_PASSWORD -h localhost ping | grep "mysqld is alive" || exit 1',
|
|
|
|
# ]
|
|
|
|
# interval: 2s
|
|
|
|
# retries: 20
|
|
|
|
restart: unless-stopped
|
2022-04-21 07:48:10 +00:00
|
|
|
|
|
|
|
volumes:
|
2022-05-07 14:35:50 +00:00
|
|
|
db-data:
|
2022-04-21 08:06:30 +00:00
|
|
|
driver: local
|
2022-05-07 14:35:50 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
driver: bridge
|