Connecting the DB Container
Connecting the application and database
We'll cover the following...
In this lesson, we will complete the remaining steps.
For this lesson,
git checkout 6589c4f6586ca7efb25d8819fc886181dec771e9
to get to the specific code.
Till now, we have gotten to get the MySQL shell of the container and checked for our database. The next step is to establish a connection between the app and the database container.
App and DB connectivity
As per the diagram below, by default, both containers should be in the same bridge network. So, let’s check for that.
Type docker network ls
& docker inspect <NETWORK ID>
and look for the containers section.