Fast local testing with Docker instead of Cloud Build delays.
# Configure Docker to use gcloud credentials
gcloud auth configure-dockerDev OAuth App:
- Authorization callback URL:
https://redstring-test-umk552kp4q-uc.a.run.app/oauth/callback - Save Client ID/Secret as:
GITHUB_CLIENT_ID_DEV,GITHUB_CLIENT_SECRET_DEV
Dev GitHub App:
- Homepage URL:
https://redstring-test-umk552kp4q-uc.a.run.app/ - User authorization callback URL:
https://redstring-test-umk552kp4q-uc.a.run.app/oauth/callback - Webhook URL:
https://redstring-test-umk552kp4q-uc.a.run.app/api/github/app/webhook - Save as:
GITHUB_APP_ID_DEV,GITHUB_APP_PRIVATE_KEY_DEV,GITHUB_APP_SLUG_DEV
# OAuth App secrets
echo "your-dev-oauth-client-id" | gcloud secrets create github-client-id-dev --data-file=-
echo "your-dev-oauth-client-secret" | gcloud secrets create github-client-secret-dev --data-file=-
# GitHub App secrets
echo "your-dev-app-id" | gcloud secrets create github-app-id-dev --data-file=-
gcloud secrets create github-app-private-key-dev --data-file=path/to/dev-app-private-key.pem
echo "redstring-semantic-sync-dev" | gcloud secrets create github-app-slug-dev --data-file=-Add dev secrets to scripts/local-build.sh:
--set-secrets "GITHUB_CLIENT_ID_DEV=github-client-id-dev:latest,GITHUB_CLIENT_SECRET_DEV=github-client-secret-dev:latest,GITHUB_APP_ID_DEV=github-app-id-dev:latest,GITHUB_APP_PRIVATE_KEY_DEV=github-app-private-key-dev:latest,GITHUB_APP_SLUG_DEV=github-app-slug-dev:latest,GITHUB_CLIENT_ID=github-client-id:latest,GITHUB_CLIENT_SECRET=github-client-secret:latest,GITHUB_APP_ID=github-app-id:latest,GITHUB_APP_PRIVATE_KEY=github-app-private-key:latest"# Fast local build and deploy (30 seconds vs 5+ minutes)
./scripts/local-build.sh✅ Speed: 30 seconds vs 5+ minutes with Cloud Build
✅ M4 MacBook: Native ARM64 builds
✅ Dev/Prod Separation: Different GitHub Apps for testing
✅ Same Infrastructure: Uses Cloud Run, just faster builds
- Make code changes
- Run
./scripts/local-build.sh - Test at
https://redstring-test-umk552kp4q-uc.a.run.app - Deploy to prod when ready
The OAuth server automatically detects the environment:
- Production: Uses
GITHUB_CLIENT_ID,GITHUB_APP_IDetc. - Test/Dev: Uses
GITHUB_CLIENT_ID_DEV,GITHUB_APP_ID_DEVetc.
This happens based on the request host/origin, so your test deployment automatically uses dev credentials while prod uses prod credentials.