Example Flask application which stores data in PostgreSQL database
Install dependencies and develop locally
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt
Run application locally with docker-compose
pip install docker-compose
docker-compose up --build
Run pre commit hooks
pip install pre-commit
pre-commit install
pre-commit run --all-files
flowchart LR
A[Client] -->|http| B(Cloud Run) -->|socket| C[Cloud SQL]
Create base infrastructure. Be sure to update backend.tf
to setup remote backend
cd deploy/
terraform init
terraform plan
terraform apply
Build and update image in Cloud Run using BlueGreen deploy technique
gcloud init
./deploy.sh