lukeed / cfw

(WIP) A build and deploy utility for Cloudflare Workers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple environments (spanning multiple zone ids)

dhrubabasu opened this issue · comments

My wrangler.toml file looks something like this:

name = "worker"
type = "javascript"
route = "..."
vars = { ... }

[build]
upload.format = "service-worker"
command = "yarn run build"

[env.qa]
route = "..." # Zone ID 1
vars = { ... }

[env.staging]
route = "..." # Zone ID 2
vars = { ... }

[env.production]
route = "..." # Zone ID 2
vars = { ... }

Is there a way to specify different environments, each with their respective settings, in cfw?

No, they are completely separate. They can only overlap when you use cfw as a wrangler custom build

@lukeed Is there a way to have that setup in cfw itself? I want to drop wrangler altogether.

The only hint I found was in the api.svelte.dev repo but it seems like you can only have one env.

Eventually cfw will have multiple env support. It's mostly a question of what that config looks like in a cfw world