An open API service indexing awesome lists of open source software.

https://github.com/wizzfi1/wisdom-flask

CI/CD Flask app with GitHub Actions & Docker, deployed to AWS EC2 via SSH
https://github.com/wizzfi1/wisdom-flask

aws ci-cd cloud-engineering devops docker flask github-actions python

Last synced: 2 days ago
JSON representation

CI/CD Flask app with GitHub Actions & Docker, deployed to AWS EC2 via SSH

Awesome Lists containing this project

README

          

# 🧠 Wisdom Flask Β· GitHub β†’ Docker Hub β†’ AWS EC2 πŸš€

A lightweight Flask web application containerized with Docker, auto-built via GitHub Actions, and deployed to an AWS EC2 instance through secure SSH-based CI/CD.

---

This project demonstrates a complete DevOps deployment pipeline:

- βœ… Python Flask web application
- βœ… Dockerized with a lightweight, production-ready image
- βœ… GitHub Actions workflow that automates deployment
- βœ… Secure SSH-based delivery to AWS EC2 on every push
- βœ… Publicly accessible at: http://51.21.196.52:5000

> πŸ› οΈ CI/CD without clickops. Just code β†’ deploy.

---

### πŸ”— Live Project Links

- 🧠 **Live App**: http://51.21.196.52:5000
- πŸ“¦ **Docker Image**: [Docker Hub Repo](https://hub.docker.com/r//wisdom-flask)
- 🧰 **Deployed via**: [GitHub Actions Workflow](.github/workflows/deploy-to-ec2.yml)

---

### πŸ’‘ What This Proves

- You understand CI/CD workflows **beyond tutorials**
- You can securely automate production-like infrastructure
- You’re capable of cloud deployment with industry tools

---

## 🐳 Run Locally

### Clone the repo:

git clone https://github.com/wizzfi1/wisdom-flask.git
cd wisdom-flask

Build and run:

docker build -t wisdom-flask .
docker run -p 5000:5000 wisdom-flask
Then open http://localhost:5000

πŸ” CI/CD: GitHub Actions β†’ AWS EC2
This project uses GitHub Actions to deploy automatically to an EC2 instance on every push to main.

πŸ” Secrets Used:
EC2_HOST β†’ your EC2 public IP

EC2_SSH_KEY β†’ your private SSH key (added via GitHub Secrets)

πŸ’» Workflow File:

.github/workflows/deploy-to-ec2.yml
What it does:
Connects to EC2 using SSH

Pulls the latest Docker image from Docker Hub

Stops and replaces the running container

## πŸ“Έ Screenshot

![Flask App Screenshot](./screenshot.PNG)

## 🧱 Project Structure

```text
wisdom-flask/
β”œβ”€β”€ app.py
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
β”œβ”€β”€ .dockerignore
└── .github/
└── workflows/
└── deploy-to-ec2.yml

πŸ’‘ DevOps Stack Used

| Category | Tool |
| ---------------- | ------------------ |
| Language | Python (Flask) |
| Containerization | Docker |
| CI/CD | GitHub Actions |
| Cloud Hosting | AWS EC2 (Ubuntu) |
| Deployment | Docker Run via SSH |

⭐ Don't forget to star the repo if this helped you!