Conversation
Terraform config for e2-micro VM in us-central1-a with 30GB disk, firewall rules (SSH + 8080), deploy service account with minimal IAM roles, and systemd startup script. README documents full GCP setup, service account permissions, and GitHub Actions secrets.
Build static Go binary on push to main (backend/** path filter), SCP to GCP VM, restart systemd service, and verify health check. Runs tests before deploy. Supports manual workflow_dispatch. Updates infra README with SSH key setup and deploy secrets.
Parth576
commented
Mar 6, 2026
| push: | ||
| branches: [main] | ||
| paths: [backend/**] | ||
| workflow_dispatch: |
Owner
Author
There was a problem hiding this comment.
what is this empty workflow dispatch key?
Parth576
commented
Mar 6, 2026
|
|
||
| concurrency: | ||
| group: deploy-backend | ||
| cancel-in-progress: false |
Owner
Author
There was a problem hiding this comment.
what does this concurrency block do? it should queue if there is an existing deployment not deploy 2 pipelines at the same time
Parth576
commented
Mar 6, 2026
| go-version-file: go.mod | ||
|
|
||
| - name: Build static binary | ||
| run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o smolterms ./backend/cmd/server/main.go |
Owner
Author
There was a problem hiding this comment.
what does the CGO_ENabled=0 flag do
Parth576
commented
Mar 6, 2026
| ports = ["22"] | ||
| } | ||
|
|
||
| source_ranges = ["0.0.0.0/0"] |
Owner
Author
There was a problem hiding this comment.
can i use a env var from github env vars over here to set this to my own public ip?
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.
No description provided.