-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor Naming Convention and Fix Deployment Errors #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
benjamin-747
merged 3 commits into
gitmono-dev:main
from
WiedersehenM:feat/gcp-cloudrun-lb-certmanager
Feb 11, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
315fed9
refactor(gcp): implement dynamic naming prefixed by app_name and fix …
WiedersehenM cdeea62
refactor(gcp): simplify naming with app_name prefix and add new services
WiedersehenM 988e829
refactor(infra): fix terraform errors and standardize container image…
WiedersehenM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,40 +3,44 @@ | |
|
|
||
| # Required project and domain | ||
| project_id = "infra-20250121-20260121-0235" | ||
| base_domain = "buck2hub.com" | ||
| app_name = "mega" | ||
| base_domain = "buck2hub.com" # used for certificates / app config | ||
|
|
||
| # Region / zone (optional overrides) | ||
| # region = "us-central1" | ||
| # zone = "us-central1-b" | ||
|
|
||
| # GCS (object storage) | ||
| gcs_bucket = "mega-prod-storage" | ||
| gcs_force_destroy = false | ||
|
|
||
| # Artifact Registry (container images) | ||
| enable_build_env = true | ||
| artifact_registry_repo = "mega-prod" | ||
|
|
||
| # Cloud Run backend application | ||
| app_service_name = "mega-backend" | ||
| # Image path format: [LOCATION]-docker.pkg.dev/[PROJECT_ID]/[REPOSITORY_ID]/[IMAGE_NAME]:[TAG] | ||
| app_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega-backend:mono-0.1.0-pre-release" | ||
| # Cloud Run Images | ||
| # Note: GitHub Actions will push images directly to ${app_name}-repo. | ||
| app_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega:mono-0.1.0-pre-release" | ||
| ui_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega:mega-ui-staging-0.1.0-pre-release" | ||
| orion_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega:orion-server-0.1.0-pre-release" | ||
| campsite_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega:campsite-0.1.0-pre-release" | ||
|
|
||
| app_env = { | ||
| RAILS_ENV = "production" | ||
| RACK_ENV = "production" | ||
| # Optimized for SQLite on Cloud Run to avoid PoolTimedOut panic | ||
| MEGA_DATABASE__DB_TYPE = "sqlite" | ||
| MEGA_DATABASE__DB_PATH = "/tmp/mega.db" | ||
| MEGA_DATABASE__MIN_CONNECTION = "1" | ||
| MEGA_DATABASE__MAX_CONNECTION = "1" | ||
| MEGA_DATABASE__ACQUIRE_TIMEOUT = "30" | ||
| } | ||
|
|
||
| # Cloud Run UI (Next.js SSR) | ||
| ui_service_name = "mega-ui" | ||
| # Image path format: [LOCATION]-docker.pkg.dev/[PROJECT_ID]/[REPOSITORY_ID]/[IMAGE_NAME]:[TAG] | ||
| ui_image = "us-central1-docker.pkg.dev/your-gcp-project-id/mega-prod/mega-ui:mega-ui-staging-0.1.0-pre-release" | ||
| ui_env_vars = { | ||
| APP_ENV = "staging" | ||
| } | ||
|
|
||
| # Database (Cloud SQL) | ||
| cloud_sql_instance_name = "mega-prod-db" | ||
| cloud_sql_instance_name = "mega-db" | ||
| cloud_sql_db_name = "mega" | ||
| db_username = "mega_user" | ||
| db_password = "your-prod-db-password" | ||
|
|
@@ -49,9 +53,12 @@ cloud_sql_enable_public_ip = true | |
| vpc_connector_cidr = "10.8.0.0/28" | ||
|
|
||
| # Redis (Memorystore) | ||
| redis_instance_name = "mega-prod-redis" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同理,用app_name 拼接 redis |
||
| redis_instance_name = "mega-redis" | ||
| redis_tier = "BASIC" # no HA | ||
| redis_memory_size_gb = 1 | ||
|
|
||
| # Filestore | ||
| filestore_instance_name = "mega-fs" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同理,用app_name 拼接 fs |
||
|
|
||
| # Rails secrets (sensitive) | ||
| rails_master_key = "your-prod-rails-master-key" | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该不需要这个配置,直接用app_name 拼接 db 就行