This project is a simple CI/CD pipeline to deploy a containerised FastAPI project.
A simple threat model has been developed and can ne accessed here
- REST API framework - FastAPI
- Backend - Cloud Firestore
- Container Engine - Docker
- Version control - GitHub
- Package manager - poetry (optional for local development in a virtual environment)
- IaC - Terraform
- CI/CD - Github Actions
- creates datastore
- builds and publish image to Artifact repository
- deploys application containers management service
- picks up and deploys changes in /api and /infrastructure folders
- Managed Container Service - CloudRun or GKE
- Kubernetes deployment using kustomize
-
Clone the repository and cd in to the project folder
git clone https://github.com/baldcodr/api-store.git && cd api-store
-
Ensure you have docker running and run the following command
make build
-
The appplication should be available on 0.0.0.0/8000
-
Ensure you have poetry installed, otherwise run the following command
pip install poetry
orbrew install poetry
-
Activate the poetry virtual environment
poetry shell
-
Install dependencies
poetry install
-
The appplication should be available on 0.0.0.0/8000
NB: If developing locally, add the follwoing line to your firebase.py file
from dotenv import load_dotenv
load_dotenv()