The code in this repo has been forked from my other account.
Simple webapp created in Flask (and using a MySQL database) and tested for deployment using Docker. Created as part of the following Kodekloud corse: Docker for the Absolute Beginner
The steps required to run/deploy the app are listed below.
apt update
apt install -y python3 python3-setuptools python3-dev build-essential python3-pip python3-mysqldb
pip3 install flask
pip3 install flask-mysql
- Copy code for application
- Set up credentials and parameters for database
Start the web server:
FLASK_APP=app.py flask run --host=0.0.0.0
Visit the following URL in a browser:
http://<IP>:5000 # The welcome site of the app.
htpp://<IP>:5000/how%20are%20you # Page displays "I am good, how are you?"