Skip to content

Define & run a multi-container web application using docker-compose

Notifications You must be signed in to change notification settings

Lily-G1/Docker-Compose-to-Deploy-Web-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Docker-Compose-to-Deploy-Web-App

Define & run a simple, multi-container web application using docker-compose

To run :

Contact Form - Brave 6_13_2023 9_28_59 AM

To confirm that our app is connected to the backend, view the database to check for successful data entries:

  • $ docker ps
  • $ docker exec -it 'mysql container ID' /bin/bash
    • #mysql -u root -p (enter mysql password)
    • mysql> use db;
    • mysql> select * from test; --> to view table & confirm that form data has been entered successfully
    • exit; --> to exit mysql
    • #exit --> to exit container

ubuntu@ip-172-31-92-33_ ~ 6_13_2023 9_31_17 AM

  • $ docker compose down --> stops & removes containers, images, volumes, etc created by 'docker compose up -d'

Important to note :

  • To use a different password for MySQL, change passwords in mysql/Dockerfile and change the value of $password in form_submit.php to new password
  • The MySQL database schema was created from the template of a mysql dump. This can be found in mysql/db.sql

About

Define & run a multi-container web application using docker-compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published