-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Update Google Cloud deployment configuration and add production appsettings #43
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
feat: Update Google Cloud deployment configuration and add production appsettings #43
Conversation
WalkthroughUpdated the GitHub Actions Cloud Run deployment workflow to add a PORT env (10000), conditionally gate Docker tag/push steps, and increase Cloud Run resources (memory 512Mi→4Gi, CPU 1→2). Added appsettings.Production.json with logging, DB connection, BaseUrl (http://localhost:10000), and SMTP settings. Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Registry as Container Registry
participant CloudRun as Cloud Run (Prod/Staging)
note over GH: Workflow starts
GH->>GH: Build Docker image
alt On push or workflow_dispatch
GH->>Registry: Tag image
GH->>Registry: Push image
else Other events
note right of GH: Tag/push skipped
end
GH->>CloudRun: Deploy image (uses env PORT=10000, memory=4Gi, cpu=2)
CloudRun-->>GH: Deployment result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
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.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/deploy-gcloud.yml (1)
104-105: Document the rationale for 8x memory and 2x CPU resource increase.Memory has been increased from the default 512Mi to 4Gi (8x) and CPU from 1 to 2 (2x) for both production and staging. This is a significant resource escalation with substantial cost implications.
Ensure this increase is justified by:
- Performance bottleneck analysis
- Load testing results
- Memory/CPU profiling of the application
- Cost impact assessment
Consider adding a comment in the workflow or PR description explaining the reason for this allocation.
Also applies to: 120-121
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/deploy-gcloud.yml(3 hunks)src/Web.Api/appsettings.Production.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-deploy
🔇 Additional comments (1)
.github/workflows/deploy-gcloud.yml (1)
35-35: Verify that the application is configured to listen on the PORT environment variable.The workflow now sets
--port 10000in Cloud Run deployment (lines 108, 124), but the ASP.NET Core application must be explicitly configured to listen on this port. While the appsettings.Production.json references port 10000, there's no visible Kestrel or ASPNETCORE_URLS configuration to ensure the application actually binds to the PORT environment variable.Ensure your application (typically in
Program.csor startup configuration) is set up to listen on the PORT environment variable:// Example for ASP.NET Core builder.WebHost.ConfigureKestrel(options => { var port = int.Parse(Environment.GetEnvironmentVariable("PORT") ?? "5000"); options.ListenAnyIPHttps(port); });Or via environment variable in Cloud Run deployment:
--set-env-vars "ASPNETCORE_URLS=http://+:10000"Also applies to: 108-108, 124-124
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/deploy-gcloud.yml(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-deploy
🔇 Additional comments (1)
.github/workflows/deploy-gcloud.yml (1)
106-107: Justify the substantial resource scaling.Memory increased from 512Mi to 4Gi (8x) and CPU from 1 to 2 (2x). While increased resources can improve performance, this represents a significant cost increase. Please document the rationale—whether this was driven by performance testing, scaling requirements, or memory leak fixes.
This will also impact your GCP billing considerably. Confirm this aligns with project requirements and budget.
Also applies to: 122-123
… appsettings (#43) * feat: Update Google Cloud deployment configuration and add production appsettings * feat: Add conditional checks for Docker image tagging and pushing in CI/CD workflow
… appsettings
Summary by CodeRabbit