This is a template for generate a Spring Boot Webflux Project, build in a Gradle Docker and run in Docker Instances, helps to ensure is no "works on my system".
docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project gradle:5.4.1-jdk11 gradle build
: Build the project using a Gradle Docker and generate the JAR file at build/libs/project.jar
docker-compose up -d
: Create and Start Docker Instances;docker ps
: Check docker instances, there are one instance spring-app and other spring-mongodb;http://localhost:8080/hello
: Test the Hello World!!!
docker-compose stop
: Stop all Instances from docker-compose.yml file;docker rm spring-app
: Delete the App Docker Instance;docker rmi springboot-webflux-docker_springboot
: Delete The App Docker Image;Build Project
;Run Project
.
gradle
: Image with Gradle;openjdk
: Image with Java JDK 11;demo_springboot
: Image based onopenjdk
that contain the JAR file;mongo
: Image with MongoDB.
spring-app
: Running thedemo_springboot
image. There are a service with Netty Server running the JAR file at port 8080;spring-mongo
: Running themongo
image. There are a service with Mongo DB Instance at port 27017.
docker ps
: show all Docker Instances running;docker ps -a
: show all Docker Instances;docker images
: show all Images;docker-compose stop
: Stop all Instances from docker-compose.yml file;