Skip to content

Add a Cloud Run worker sample#325

Open
steps-re wants to merge 1 commit into
temporalio:mainfrom
steps-re:cloud-run-worker
Open

Add a Cloud Run worker sample#325
steps-re wants to merge 1 commit into
temporalio:mainfrom
steps-re:cloud-run-worker

Conversation

@steps-re

@steps-re steps-re commented Jul 7, 2026

Copy link
Copy Markdown

Adds a cloud_run_worker/ sample: a Temporal worker packaged to run on Google Cloud Run, mirroring the existing lambda_worker/ sample.

A Temporal worker is a long-running poller, not an HTTP server, but a Cloud Run service must answer its startup probe on $PORT or it never becomes healthy. So the worker starts a tiny stdlib health endpoint (200 ok) on $PORT in a daemon thread before connecting to Temporal, and the deploy uses --no-cpu-throttling so the background poller keeps running between requests. Includes the Dockerfile, a deploy script, a workflow + activity, and a README with a "Why a health server?" section.

Verified: the image builds via Cloud Build, and running it confirms the health server binds :8080 before the Temporal connect, so the startup probe passes. A full end-to-end run needs a reachable Temporal server / Temporal Cloud namespace.

Signed-off-by: Mike German <mike@stepsventures.com>
@steps-re steps-re requested review from a team as code owners July 7, 2026 19:13
@CLAassistant

CLAassistant commented Jul 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants