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 ...

Get Full Stack Development with JHipster now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.