Skip to content

Latest commit

 

History

History

wildfly-swarm-gradle

java-ee-examples (gradle) Build Status

wildfly-swarm-gradle

This repository contains simple JavaEE JAX-RS Wildfly Swarm Micro-profile example playground application

using gradle / java microprofile
bash gradlew clean build
java -Djava.net.preferIPv4Stack=true -jar build/libs/wildfly-swarm-gradle-swarm.jar
http :8080
using docker
docker build --force-rm -f ./docker/src/Dockerfile -t docker-java-ee-examples .
docker run -d -p 8080:8080 --rm --name wildfly-swarm-gradle docker-java-ee-examples
http :8080
docker rm -f -v wildfly-swarm-gradle
using docker-compose
docker-compose -f ./docker/src/docker-compose.yml up -d
http :8080
docker-compose -f ./docker/src/docker-compose.yml down -v
using docker swarm stack deploy
docker swarm init
docker service create --detach=false --name registry --publish 5000:5000 registry:2
docker build -f ./docker/src/Dockerfile -t 127.0.0.1:5000/app .
docker push 127.0.0.1:5000/app
#docker-compose -f ./docker/src/stack-deploy.yml build --force-rm --no-cache --pull
#docker-compose -f ./docker/src/stack-deploy.yml push
docker stack deploy --compose-file ./docker/src/stack-deploy.yml java-ee
docker stack services --filter name="java-ee_app" --format="{{.Name}} {{.Replicas}}" java-ee
docker service scale --detach=false java-ee_app=2

sleep 15
docker stack services java-ee

http :8080

docker swarm leave --force
docker system prune -af

links: