Skip to content

feat: added gcp-nation deployment branch with sqlite backend#25

Open
evanpetzoldt wants to merge 1 commit into
mainfrom
feat-gcp-deploy
Open

feat: added gcp-nation deployment branch with sqlite backend#25
evanpetzoldt wants to merge 1 commit into
mainfrom
feat-gcp-deploy

Conversation

@evanpetzoldt

Copy link
Copy Markdown
Collaborator

This pull request introduces a new deployment architecture for SyncBot targeting the Nation's GCP infrastructure on Cloud Run using SQLite with Litestream for continuous backup to Google Cloud Storage (GCS). It adds comprehensive infrastructure-as-code, deployment automation, and documentation for the "F3 Nation" environment. The changes enable single-instance, stateless deployment with automated backups, disaster recovery, and a streamlined CI/CD pipeline via GitHub Actions.

Key changes include:

Deployment Automation & CI/CD:

  • Added a new GitHub Actions workflow (.github/workflows/deploy-nation.yml) to automate building, pushing, and deploying the SyncBot Docker image to Cloud Run on pushes to nation-staging or nation-prod branches. This workflow uses Workload Identity Federation for secure authentication and is fully environment-variable driven.

Containerization & Runtime Environment:

  • Introduced a new Dockerfile (infra/gcp-nation/Dockerfile) tailored for the Nation deployment, which installs Python, system dependencies, Litestream for SQLite replication, and sets up the entrypoint and application code for Cloud Run.
  • Added an entrypoint script (infra/gcp-nation/entrypoint.sh) that restores the SQLite database from GCS on cold start, starts Litestream replication in the background, and launches the app.
  • Added a Litestream configuration file (infra/gcp-nation/litestream.yml) for continuous SQLite WAL streaming to GCS.

Infrastructure Configuration & Documentation:

  • Provided an example Terraform variables file (infra/gcp-nation/example.tfvars) to simplify per-environment configuration and clarify required settings for staging and production.
  • Added a Terraform provider lockfile (infra/gcp-nation/.terraform.lock.hcl) to ensure reproducible infrastructure builds.

Comprehensive Deployment Guide:

  • Added a detailed deployment guide (infra/gcp-nation/DEPLOY.md) covering architecture, prerequisites, step-by-step setup (Slack, GCP, Terraform, GitHub Actions), backup/recovery, troubleshooting, and cost estimates for the new Nation deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant