An example FastAPI backend that deploys to GCP Cloud Run using LaunchFlow.
This project will configure the following GCP resources in your GCP account:
- Postgres database hosted on GCP CloudSQL
- Redis cache hosted on GCP Memorystore
- Storage bucket hosted on Google Cloud Storage
NOTE: The GCP infrastructure is defined in infra.py
pip install -r requirements.txt
NOTE: This will install the LaunchFlow Python SDK + CLI
gcloud auth application-default login
NOTE: You will need the Google Cloud SDK installed to authenticate with GCP
lf create
Learn how the lf create
command works in the CLI Reference Docs.
Run the FastAPI application locally using Uvicorn.
lf run {your env} -- uvicorn app.main:app --reload
lf deploy
Learn how the lf deploy
command works in the CLI Reference Docs.
lf destroy
Learn how this command works in the LaunchFlow Docs.
Learn how the lf destroy
command works in the CLI Reference Docs.