This repo contains a boilerplate setup for spinning up 2 docker containers:
- A MySQL 8 container for obvious reasons
- A Python Flask container to implement a REST API
Important - you need Docker Desktop installed
- Clone this repository.
- Create a file named
db_root_password.txt
in thesecrets/
folder and put inside of it the root password for MySQL. - Create a file named
db_password.txt
in thesecrets/
folder and put inside of it the password you want to use for thewebapp
user. - In a terminal or command prompt, navigate to the folder with the
docker-compose.yml
file. - Build the images with
docker compose build
- Start the containers with
docker compose up
. To run in detached mode, rundocker compose up -d
.
conda create -n webdev python=3.9
conda activate webdev
pip install flask flask-mysql flask-restful cryptography flask-login