Last active
March 23, 2019 00:02
-
-
Save michaelneu/9d9b3126ee36ef9aa3f67f9edaf17901 to your computer and use it in GitHub Desktop.
Docker configuration to run wildfly, mysql, maven and phpmyadmin in containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
mysql: | |
image: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=password | |
- MYSQL_USER=user | |
- MYSQL_PASSWORD=password | |
- MYSQL_DATABASE=db | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
links: | |
- mysql:db | |
depends_on: | |
- mysql | |
ports: | |
- 8081:80 | |
environment: | |
- PMA_USER=root | |
- PMA_PASSWORD=password | |
wildfly: | |
build: | |
context: ./ | |
dockerfile: wildfly.Dockerfile | |
volumes: | |
- ./deployments:/opt/jboss/wildfly/standalone/deployments/ | |
- ./staging:/staging | |
links: | |
- mysql | |
- maildev | |
depends_on: | |
- mysql | |
ports: | |
- 8080:8080 | |
- 9990:9990 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: war deploy | |
deploy: | |
cp project/target/*.war deployments/ | |
clean: | |
rm deployments/*.war | |
docker run --rm -v `pwd`/project:/app -v m2:/root/.m2 -w /app maven:alpine mvn clean | |
war: | |
docker run --rm -v `pwd`/project:/app -v m2:/root/.m2 -w /app maven:alpine mvn compile war:war | |
server: | |
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM njmittet/alpine-wildfly:10.1.0.Final | |
RUN /opt/jboss/wildfly/bin/add-user.sh admin password --silent | |
CMD /opt/jboss/wildfly/bin/standalone.sh --server-config=standalone.xml -bmanagement=0.0.0.0 -b 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment