Cloud Run: Meteor with Worker
cloud-run-meteor-with-worker.ts
const config = {
appName: "test-app",
customerName: "pan",
components: {
web: {
dir: "web",
build: {
type: "meteor",
},
deploy: {
type: "google-cloudrun",
projectId: "google-project-id",
region: "europe-west6",
// worker pools are like services, but they don't have a load balanced endpoint and don't support autoscaling.
// But they are 40% cheaper than services.
workerPools: {
// its usually better to create another catladder component for the worker
// but in some legacy cases it might be easier to add service or worker pool
// notice that you can't use different secrets on the worker, it will receive the same env vars as the normal service
// you can specify extra vars though
worker: {
command: [
"/bin/sh",
"-c",
"BACKGROUND_JOBS_ENABLED=1 node main.js",
],
},
},
},
},
},
} satisfies Config;