|
| 1 | +📦 FastAPI Deploy Pipeline |
| 2 | +========================== |
| 3 | + |
| 4 | +**Description:** This project is a production-ready, containerized **FastAPI** application. It is fully automated for continuous integration and deployment using **GitHub Actions**, **Docker**, and **Terraform** on **AWS EC2**. The pipeline integrates automated unit and API testing, failure recovery via rollback scripts, and structured manual QA validation processes. |
| 5 | + |
| 6 | +* * * |
| 7 | + |
| 8 | +🔄 Deployment Workflow |
| 9 | +---------------------- |
| 10 | + |
| 11 | +1. Code is committed and pushed to the **GitHub** repository. |
| 12 | +2. **CI/CD pipeline** is triggered via GitHub Actions: |
| 13 | + * Execute unit and integration tests |
| 14 | + * Build Docker image |
| 15 | + * Push image to DockerHub |
| 16 | + * Provision AWS EC2 resources via **Terraform** |
| 17 | + * Deploy Docker container to provisioned infrastructure |
| 18 | +3. On deployment failure: |
| 19 | + * `rollback.sh` is invoked to restore the previous stable version |
| 20 | +4. Post-deployment QA: |
| 21 | + * Execution of `postman_collection.json` |
| 22 | + * Validation against `manual_test_cases.md` |
| 23 | + |
| 24 | +* * * |
| 25 | + |
| 26 | +📌 Technology Stack |
| 27 | +------------------- |
| 28 | + |
| 29 | +* **FastAPI** – Asynchronous Python web framework |
| 30 | +* **GitHub Actions** – Continuous integration and delivery (CI/CD) |
| 31 | +* **Docker** – Containerization and deployment standardization |
| 32 | +* **Terraform** – Infrastructure provisioning and management |
| 33 | +* **AWS EC2** – Scalable compute environment |
| 34 | +* **Postman** – API validation and test automation |
| 35 | + |
| 36 | +* * * |
| 37 | + |
| 38 | +✅ Testing and Quality Assurance |
| 39 | +------------------------------- |
| 40 | + |
| 41 | +* `test_main.py` – Automated unit and API tests executed in CI |
| 42 | +* `manual_test_cases.md` – Structured manual QA verification |
| 43 | +* `postman_collection.json` – Postman test suite for endpoint validation |
| 44 | + |
| 45 | +* * * |
| 46 | + |
| 47 | +🔁 Rollback Mechanism |
| 48 | +--------------------- |
| 49 | + |
| 50 | +Deployment failures are handled through an automated rollback process using `rollback.sh`, restoring the last known stable container state to ensure high availability and system integrity. |
0 commit comments