Generated Docker Compose files

By default, JHipster will generate Docker Compose files that allow us to run the application completely in the containerized environment, irrespective of the options chosen. For example, in the gateway application that we have generated, the following files are generated by default under src/main/docker, among a few others:

  • sonar.yml: This file creates and starts a SonarQube server.
  • mysql.yml: This file creates and starts a MySQL database server and creates a user and schema. If we choose another database, the Docker Compose file that was generated would also correspond to that.
  • monitoring.yml: This file creates and starts Prometheus and Grafana for monitoring. Required configurations for the Grafana dashboard and Prometheus are also generated.
  • jhipster-registry.yml: This file creates and starts a JHipster Registry service.
  • app.yml: This is the main file that creates and starts the application, along with services such as JHipster Registry and the database.

In addition to this, JHipster also creates a JIB configuration, as we saw earlier, which helps you containerize the application.

Then, we will see a folder called central-server-config. This will be used as a central configuration server for the JHipster Registry. 

When the registry and the application are running in Docker, it uses application.yml from the docker-config folder as the central configuration server.

On the other hand, when running only the registry in Docker mode, the application, not in Docker, will use application.yml from the localhost-config folder. The key difference is that the URL defining the Eureka client varies.

Now, let's look at the important Docker files that have been generated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.221