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 gateway with Consul
Let us choose JHipster-gateway with Zuul proxy:

Then, we have to select the location of the microservices gateway and applications. This is the main reason why we have generated the applications inside a single parent folder. This will help plugins and sub-generators to easily find the docker configuration files created. We will select the default option (../)

After selecting the location, JHipster will search inside the given folder for any JHipster generated the application and list them in the next question.
In our case, it lists notification, invoice, and gateway. We can choose all of them and hit Enter:

It automatically detects that we have used MongoDB and asks us the next question; whether we would like to have MongoDB as a cluster. We will not choose anything here:

Then it asks about the console; whether we need to set up any consoles for the application. We will choose logs and metrics with the JHipster Console (based on ELK and Zipkin):

We can either opt out from the monitoring option or choose Prometheus. That connects with Prometheus and shows metrics only.
Then JHipster asks whether you need Curator or Zipkin:
- Curator will help you to curate and manage the indices created by Elasticsearch
- Zipkin (as discussed in the previous chapter)

Since the JHipster console is chosen, it will ask for additional pieces of information supported by the console. They include Zipkin and Curator. We have already seen Zipkin. Curator, on the other hand, will help us to manage and curate the indices in Elasticsearch.
We will choose only Zipkin here.

Finally, it asks for the password for the JHipster Registry; we will go with the default here:

That is it; we have just created a higher-level Dockerfile that has information about all the services that we need to run the application successfully.
Now we can just run the entire suite with the following command:
> docker-compose up -d
This will start the gateway, notification, invoice, and the registry, along with the console and all other required services.