This repository demonstrates a simple Python application to calculate the mean of numbers entered by the user. The application is containerized using Docker and managed with a CI/CD pipeline integrated with GitHub Actions to deploy the Docker image to Docker Hub.
Find the Docker image on Docker Hub: yijia123/mini12.
├── Dockerfile # Instructions for containerizing the app
├── requirements.txt # Python dependencies
├── app.py # Main Python Flask application
├── Makefile # Automation for Docker commands
└── README.md # Project documentation
Please make sure you have Docker installed and a Docker Hub account.
git clone https://github.com/nogibjj/yijia_ids706_miniProj12.git
cd yijia_ids706_miniProj12
Use the make command to build the Docker image:
make build
Run the Flask application in a Docker container:
make run
The application will be accessible at: http://127.0.0.1:8080.
This application calculates the mean of a list of numbers provided by the user.
- Access the application via a browser at http://127.0.0.1:8080.
- Enter a comma-separated list of numbers in the form and submit.
- The application will calculate and display the mean of the provided numbers.
Set up the following secrets in your GitHub repository under Settings > Secrets and variables > Actions:
- DOCKER_USERNAME: Your Docker Hub username.
- DOCKER_PASSWORD: Your Docker Hub password or access token.
- Automatically builds the Docker image when changes are pushed to the main branch.
- Pushes the built Docker image to Docker Hub.