Skip to content

Instantly share code, notes, and snippets.

@ChrisMarxDev
Created March 5, 2026 09:48
Show Gist options
  • Select an option

  • Save ChrisMarxDev/9b36b587f514cb0548200be41f2afc9f to your computer and use it in GitHub Desktop.

Select an option

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)
#!/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