[← All integrations](/getting-started)

Install · Verified

# Google Cloud Run / AWS ECS

serverless container

Push the canonical Docker image, bind the token from the platform's secret manager. Cloud Run example below maps cleanly to ECS / Azure Container Apps.

**Start here first.** Every platform recipe below assumes the canonical Express + Docker install at [/install/express-docker](/install/express-docker). The snippets on this page are the platform-specific deltas on top of that baseline.

Push the canonical Docker image to your registry and bind the token from the platform's secret manager. The Cloud Run example below maps cleanly to ECS / Cloud Run / Azure Container Apps.

terminal — Cloud Runcopy

```
# Build + push image (any registry: gcr.io, ghcr.io, ECR, Docker Hub).
docker build -t gcr.io/PROJECT/yoursite:latest .
docker push gcr.io/PROJECT/yoursite:latest

# Token in Secret Manager (one-time).
echo -n 'asit_xxxxxxxxxxxx' | gcloud secrets create agentsite-token --data-file=-

# Deploy with the secret bound to the env var.
gcloud run deploy yoursite \
  --image gcr.io/PROJECT/yoursite:latest \
  --port 3000 \
  --set-env-vars AGENTSITE_SITE=https://yoursite.com,DIST_DIR=/dist \
  --set-secrets AGENTSITE_TOKEN=agentsite-token:latest \
  --allow-unauthenticated
```

**Cold starts.** The snippet warms an in-memory 5-min cache per instance. With Cloud Run min-instances at 0, every cold instance issues a fresh `/render` call on first request. Set `--min-instances=1` for a hot homepage if latency matters.

[← All integrations](/getting-started#by-hand)  ·  [Need help with this recipe? →](/contact)

Cookies

We use cookies to make this site work and to understand how it's used. [Learn more](https://www.cookiesandyou.com/)

Decline Got it