Created
March 5, 2026 09:48
-
-
Save ChrisMarxDev/9b36b587f514cb0548200be41f2afc9f to your computer and use it in GitHub Desktop.
Deploy a Dart Frog server to Google Cloud Run as a compiled executable (no Docker needed)
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
| #!/bin/bash | |
| # Deploy a Dart Frog server to Google Cloud Run as a native executable | |
| # No Dockerfile needed — faster cold starts, simpler pipeline | |
| # 1. Build the Dart Frog project and compile for Linux | |
| dart_frog build | |
| dart compile exe build/bin/server.dart -o build/server.exe | |
| # 2. Deploy to Cloud Run | |
| gcloud beta run deploy <SERVICE_NAME> \ | |
| --source build/ \ | |
| --no-build \ | |
| --base-image=nodejs22 \ | |
| --command "./server.exe" \ | |
| --project=<PROJECT_ID> \ | |
| --region=<REGION> \ | |
| --allow-unauthenticated \ | |
| --set-env-vars "MY_VAR=my-value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment