feat: added gcp-nation deployment branch with sqlite backend#25
Open
evanpetzoldt wants to merge 1 commit into
Open
feat: added gcp-nation deployment branch with sqlite backend#25evanpetzoldt wants to merge 1 commit into
evanpetzoldt wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
.github/workflows/deploy-nation.yml) to automate building, pushing, and deploying the SyncBot Docker image to Cloud Run on pushes tonation-stagingornation-prodbranches. This workflow uses Workload Identity Federation for secure authentication and is fully environment-variable driven.Containerization & Runtime Environment:
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.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.infra/gcp-nation/litestream.yml) for continuous SQLite WAL streaming to GCS.Infrastructure Configuration & Documentation:
infra/gcp-nation/example.tfvars) to simplify per-environment configuration and clarify required settings for staging and production.infra/gcp-nation/.terraform.lock.hcl) to ensure reproducible infrastructure builds.Comprehensive 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.