Deploying the Application

Deployment with Docker Compose

  1. Before deploying with Docker Compose, we need to remove the two Docker Containers that we ran earlier using this command: sudo docker rm -f backend frontend

7.1.1.png

  1. Create a new SSH session, then navigate to the docker-compose-env directory at the root of the project and use sudo nano backend.app.env to update the DB_HOST variable to your RDS Endpoint.
cd docker-compose-env
sudo nano backend.app.env

7.1.3.png

7.1.4.png

  1. Next, we can simply run:
sudo docker compose -f docker-compose.app.yml up
  1. This will start the two containers just like we did in the previous section.

7.1.5.png

  1. Our application is up and running. In the next step, we will proceed to check the application. 7.1.6.png