This GitHub repository deploys a simple Python Flask web application.
- You have Python 3.x installed on your local machine.
- You have PIP3 Python package manager installed on your local machine.
- You have the Virtual Python Environment builder installed on your local machine.
-
Create a new Python virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
source .venv/bin/activate
-
Install the required Python dependencies:
pip3 install -r requirements.txt
After creating and configuring your virtual environment, run the following command to start the Python Flask web application:
python3 application.py
Next, open a web browser and navigate to:
http://127.0.0.1:5000
To build the Docker container, run the following command:
docker build -t uwaworkflows2023 .
To run the Docker container, run the following command:
docker run -it -p 80:5000 uwaworkflows2023:latest
Next, open a web browser and navigate to:
http://127.0.0.1
Alternatively, you can pull a compiled Docker container here.
After creating and configuring your virtual environment, run the following command to run the unit tests:
pytest
# OR
pytest --junitxml=tests/report.xml
Alternatively, you can run the unit tests in the Testing
extension of Visual Studio Code.
Once you have finished working with the Python Virtual Environment, run the following command to deactivate it:
deactivate