Starting the production database with Docker
JHipster creates a Dockerfile for the application and provides docker-compose
files for all the technologies we choose, such as the database, search engine, Jenkins, and so on, under src/main/docker
:
├── app.yml - Main compose file for the application ├── Dockerfile - The Dockerfile for the application ├── hazelcast-management-center.yml - Compose file hazelcast management center ├── jenkins.yml - Compose file for Jenkins ├── mysql.yml - Compose file for the database that we choose. └── sonar.yml - COmpose file for SonarQube.
Let's see how we can start our production database using Docker from the compose file provided under src/main/docker/mysql.yml
. You will need to use a Terminal for the following instructions:
- Run
docker --version
anddocker-compose --version
to ensure these are installed. - Run
docker ps
to list the running containers. If you are not already running any containers, you should see an empty list. - Let's start the DB by running
docker...