From 1fe9817bd2f6740092ca60e379f592b68b93c3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Thu, 21 Apr 2022 10:06:30 +0200 Subject: [PATCH] feat: mariadb --- .gitignore | 3 +++ docker-compose.yml | 26 +++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d67a5bc..cd74a91 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ # Ignore Gradle build output directory build bin + +# Ignore mariadb volume directory +mariadb diff --git a/docker-compose.yml b/docker-compose.yml index 2367305..84b45ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,14 +3,34 @@ version: "3" services: wildfly: image: quay.io/wildfly/wildfly + container_name: wildfly + hostname: wildfly ports: - - "8080:8080" - - "9990:9990" + - 8080:8080 + - 9990:9990 volumes: - - "./build/libs/:/opt/jboss/wildfly/standalone/deployments/" + - ./build/libs/:/opt/jboss/wildfly/standalone/deployments/ environment: - WILDFLY_PASSWORD=password + 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/ + restart: always volumes: wildfly_data: driver: local + mariadb: + driver: local