Skip to content

*Deploy Mega to GCP using Cloud Run (backend mono + UI) with private networking#4

Merged
benjamin-747 merged 1 commit intogitmono-dev:mainfrom
WiedersehenM:main
Feb 6, 2026
Merged

*Deploy Mega to GCP using Cloud Run (backend mono + UI) with private networking#4
benjamin-747 merged 1 commit intogitmono-dev:mainfrom
WiedersehenM:main

Conversation

@WiedersehenM
Copy link
Contributor

Summary

This PR completes the GCP Terraform deployment for Mega by switching the compute layer to fully managed Cloud Run (per feedback to avoid GKE maintenance). It deploys the backend (mono) and UI (Next.js) as separate Cloud Run services, adds private networking (VPC + Serverless VPC Access connector) for Cloud SQL/Redis access, and updates examples/docs to use ECR Public images.

Key Changes

  • Cloud Run services
    • Add Cloud Run service for backend (mono)
    • Add Cloud Run service for UI (Next.js SSR)
    • Output URLs for both services
  • Private networking
    • Create VPC (when private networking is enabled)
    • Add Serverless VPC Access connector module and wire Cloud Run egress through it
    • Configure Cloud SQL private service connection and Memorystore authorized network
  • Image strategy
    • Use ECR Public images directly in terraform.tfvars.example (no extra infra required)
  • Terraform compatibility fixes
    • Update Cloud Run env var configuration to provider-compatible env blocks
    • Convert single-line variable definitions to multi-line format for better Terraform compatibility
  • Docs
    • Update deployment/README.md to English and align with Cloud Run-based deployment flow

- Add Cloud Run services for backend (mono) and UI (Next.js)
- Add Serverless VPC Access connector and configure Cloud Run egress for private access
- Wire Cloud SQL/Redis/Filestore to the VPC for private connectivity
- Update Terraform examples and README for ECR Public images and new outputs
- Remove legacy GKE/ingress/orion-worker configs and related files
- Fix Terraform/provider compatibility issues (env blocks and variable definitions)

Signed-off-by: Hongze Gao <15101764808@163.com>
@benjamin-747 benjamin-747 added this pull request to the merge queue Feb 6, 2026
Merged via the queue into gitmono-dev:main with commit 7e4b3c0 Feb 6, 2026
1 check failed
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.

2 participants