Do It Yourself - Exercise
A docker-compose exercise to test all you have learnt to far
We'll cover the following
Problem statement
In this exercise, you will write a docker-compose.yml file to automate the deployment of two services. A skeleton will be provided and you have to join the services and make it work.
The app will be similar to what we have built in this section so you don’t have to deal with the Python code. You only have to focus on creating the docker-compose.yml file.
You can use the terminal below and carry out different troubleshooting commands to check what you are missing and what needs to be fixed.
This exercise will require you to discover some commands on your own, which we have not covered directly in any of the lessons of this section. But you can think and take a reference to the official documentation to solve it.
So, let’s take a look at the skeleton.
Make sure that you don’t make any changes in any other file except docker-compose.yml. All the changes required to solve this exercise are in the docker-compose.yml file only. You can read the app.py file for DB credentials used by the application.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy