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 organize all your application's Docker Compose files together. It creates a single Docker Compose file that refers to all the applications and their database, along with the registry and monitoring.

Let's go to the base folder, 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 ...

Get Full Stack Development with JHipster - Second Edition 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.