Skip to content

Hands on laboratory to create a basic online calculator application that will be deployed to Amazon Web Services (AWS)

License

Notifications You must be signed in to change notification settings

BluCloudEngineer/UWA-Workflows-in-GitHub-2023

Repository files navigation

UWA Workflows in GitHub - Hands On Lab

GitHub Contributors GitHub Downloads GitHub Forks GitHub Issues GitHub Last Commit GitHub License GitHub Open Issues GitHub Open Pull Requests GitHub Python Version GitHub Repository Size GitHub Stars GitHub Weekly Commit Activity

Overview

This GitHub repository deploys a simple Python Flask web application.

Assumptions

  • 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.

Setting Up Your Development Environment

  1. Create a new Python virtual environment:

    python3 -m venv .venv
  2. Activate the virtual environment:

    source .venv/bin/activate
  3. Install the required Python dependencies:

    pip3 install -r requirements.txt

Usage

Local

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

Docker

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.

Unit Tests

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.

Deactivate Python Virtual Environment

Once you have finished working with the Python Virtual Environment, run the following command to deactivate it:

deactivate

About

Hands on laboratory to create a basic online calculator application that will be deployed to Amazon Web Services (AWS)

Resources

License

Stars

Watchers

Forks

Packages

No packages published