https://github.com/lily-g1/docker-compose-to-deploy-web-app
Define & run a multi-container web application using docker-compose
https://github.com/lily-g1/docker-compose-to-deploy-web-app
docker docker-compose html-css mysql-database php
Last synced: 3 months ago
JSON representation
Define & run a multi-container web application using docker-compose
- Host: GitHub
- URL: https://github.com/lily-g1/docker-compose-to-deploy-web-app
- Owner: Lily-G1
- Created: 2023-06-13T07:33:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T17:41:17.000Z (about 3 years ago)
- Last Synced: 2025-07-01T05:40:45.966Z (about 1 year ago)
- Topics: docker, docker-compose, html-css, mysql-database, php
- Language: CSS
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker-Compose-to-Deploy-Web-App
Define & run a simple, multi-container web application using docker-compose
## To run :
- Install [Docker](https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository)
- $ git clone https://github.com/Lily-G1/Docker-Compose-to-Deploy-Web-App.git
- $ cd Docker-Compose-to-Deploy-Web-App/web-app/
- $ docker compose build
- $ docker compose up -d
- Check browser with IP address or localhost:80. To test the app, fill form & submit

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

- $ 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