Generating docker-compose files for microservices
There are many docker-compose
files and maintaining them is hard. Thankfully, JHipster has a docker-compose
 sub generator bundled with it. The Docker-compose
 sub generator helps you to organize all your application's Dockerfiles together. It creates a single Dockerfile that refers to the application's Dockerfiles.Â
Let's go to the base folder and create a folder and name it docker-compose
:
> mkdir docker-compose && cd docker-compose
Once inside the docker-compose
folder, we can run the following command:
jhipster docker-compose
This will generate the Dockerfiles.
As usual, it will ask us a series of questions, before generating the files:
At first, it asks which type of application we would like to deploy. We will select the microservice application as an option.
This is followed by choosing the type of gateway that we would like to use; there are two options available, a JHipster-gateway with Zuul proxy, and the more exciting, Traefik...