Skip to content

chore: merge dev into production#34

Merged
ChingEnLin merged 5 commits into
productionfrom
dev
May 17, 2026
Merged

chore: merge dev into production#34
ChingEnLin merged 5 commits into
productionfrom
dev

Conversation

@ChingEnLin

Copy link
Copy Markdown
Owner

Summary

Promotes all changes from dev to production. Includes the full IaC migration completed in PR #32 plus the follow-up fixes:

Pre-deploy checklist

  • Terraform applied (VPC connector, Secret Manager, Cloud Run SA, IAM)
  • Secret Manager populated with all 6 secrets
  • dev branch manually deployed and verified (frontend 200, backend 403 from public internet)
  • Old GitHub Secrets deleted

Test plan

  • CI deploy to production succeeds
  • Frontend loads at https://querypal.virtonomy.io
  • /api/health returns 200 through nginx proxy
  • Direct request to backend Cloud Run URL returns 403

🤖 Generated with Claude Code

claude and others added 5 commits May 15, 2026 07:50
…nd private backend

- Secret Manager: move all sensitive env vars (Azure credentials, Gemini key,
  DB credentials) out of GitHub Secrets and into GCP Secret Manager; Cloud Run
  reads them at runtime via --set-secrets, so secrets are never exposed in
  workflow logs or build args.

- VPC Connector: add Serverless VPC Access connector (terraform/network.tf) so
  Cloud Run services can reach Cloud SQL and each other over the private VPC
  network.

- Private backend: set backend Cloud Run ingress to 'internal', blocking all
  public internet access. Frontend nginx now proxies /api/* to the backend's
  internal URL (with BACKEND_URL injected as a runtime env var), so the browser
  never needs a direct connection to the backend.

- Terraform IaC: terraform/ directory manages the VPC connector, Secret Manager
  secrets, Cloud Run service account, and Cloud SQL (importable via import.sh).
  CI continues to own image builds and Cloud Run deployments.

- Data migration script: scripts/migrate_db.sh migrates PostgreSQL data between
  Cloud SQL instances via Cloud SQL Auth Proxy if the database ever needs to be
  rebuilt.

https://claude.ai/code/session_01SRRzCWrpwgMpdYFurMVn7m
…ITE_API_BASE_URL

GitHub Actions does not interpolate ${{ env.X }} inside the top-level env:
block, so the full SA email could not reference PROJECT_ID there. Replaced
CLOUD_RUN_SA with CLOUD_RUN_SA_NAME and build the email inline in the flags
blocks where expression context is available.

Added a comment explaining VITE_API_BASE_URL=/api — it is the nginx location
prefix, not a full URL, because the browser calls the frontend's own origin
and nginx proxies /api/* to the internal backend.

https://claude.ai/code/session_01SRRzCWrpwgMpdYFurMVn7m
…README

- Add production architecture Mermaid diagram showing Cloud Run services,
  VPC connector, Secret Manager, Cloud SQL, and external dependencies
- Add network security model table (frontend public / backend internal)
- Add secret management table listing all Secret Manager secrets
- Add IaC ownership table (Terraform vs CI pipeline)
- Add CI/CD pipeline Mermaid flowchart showing Workload Identity auth,
  image build/push, and deploy steps with secret injection
- Add Terraform to technology stack table

Also remove overly broad github_actions_secret_accessor IAM binding from
terraform/iam.tf — the GitHub Actions SA never reads secret values directly;
Cloud Run reads them at startup using the Cloud Run SA identity.

https://claude.ai/code/session_01SRRzCWrpwgMpdYFurMVn7m
feat: harden Cloud Run security with Secret Manager, VPC connector, and private backend
* fix: align database.tf backup config with actual Cloud SQL instance state

Backup was disabled on the real instance; syncing so terraform plan is clean
with no spurious diff on next apply.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: reorganize README into focused docs/ files

README trimmed to a lean landing page. Detailed content moved to:
- docs/ARCHITECTURE.md (BFF pattern, ReAct agent, security model)
- docs/INFRASTRUCTURE.md (Cloud topology, Terraform, Secret Manager, CI/CD)
- docs/AZURE_SETUP.md (Entra ID registration, Cosmos DB, frontend config)
- docs/DEVELOPMENT.md (local setup, testing, code style)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@ChingEnLin ChingEnLin merged commit b363f16 into production May 17, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request May 17, 2026
## [2.10.1](v2.10.0...v2.10.1) (2026-05-17)

### Maintenance

* merge dev into production ([#34](#34)) ([b363f16](b363f16)), closes [#33](#33)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.10.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants