Comments (6)
What I do is the following:
- Use
wrangler publish
to publish the actual Worker to our account and under theworkers.dev
domain. When this happens the script is created in our account. - I then use the API to assign routes for all the zones that need the Worker (i.e. via https://api.cloudflare.com/#worker-routes-create-route).
Like the original poster we also have hundreds of domains which need the exact same script. And the environment
concept creates script names with the environment name appended with the exact same content. This eats into our script number quota but also makes it a little difficult to reason about. One disadvantage of reusing the same script for many zones is obviously a bad deploys blast radius is rather large.
My biggest complaint about what I have had to do is I have to separate out the publishing and route deployment in some circumstances and I do wish that Wrangler could cover this use case.
from workers-sdk.
It is possible via UI and API directly, we did this as a workaround until feature is implemented
from workers-sdk.
Closing in favour of #669 since we have the feature, just haven't documented it.
from workers-sdk.
Any update on this? I believe this is possible via the UI?
from workers-sdk.
Is this still something being worked on? The reason that we are using it is we have a domain setup as follows
Production: client.domain.io/api/*
Staging: client.domain.dev/api/*
We decided to purchase these additional domains versus using client.dev.domain.io because Cloudflare does not like multiple layers of subdomains (This gave us issues)
I've seen mentions of a workaround. Ideally I'd love to have two zones in my wrangler.toml, but until then how are people accomplishing this until then?
from workers-sdk.
Deploying to multiple domains "just works" in wrangler v2. I'm going to move this to the wranglerv2 repo for now, and we'll close it after we have proper docs and do a GA release.
from workers-sdk.
Related Issues (20)
- 🐛 BUG: wrangler throws error trying to list secrets when no secrets set HOT 5
- 🐛 BUG: wrangler pages deploy throws misleading error when experimental:nodejs_compat_v2 is enabled HOT 2
- 🐛 BUG: Tailing - workers.api.error.script_not_found [code: 8000068] HOT 3
- 🐛 BUG:D1 bindings require module-format workers. [code: 10021] HOT 3
- 🐛 BUG: Node API missing warnings when experimental:nodejs_compat_v2 is enabled for Pages project
- JARVIX
- 🚀 Feature Request: Generate more general types for wrangler types HOT 1
- 🐛 BUG: Cannot back up D1 DB with virtual tables HOT 1
- 🐛 BUG: D1 `DELETE` has an unexpected limit HOT 1
- 🐛 BUG: HOT 1
- 🚀 Feature Request: Do TypeScript type checking on `wrangler deploy` HOT 3
- 🐛 BUG: 'ZedError: Input not instance of Response' from serviceBindings
- Cashout21
- 🐛 BUG: After using npm create cloudflare most examples do not work with TypeScript types HOT 1
- 🚀 Feature Request: Validate all configuration at once rather than throw error on first encountered invalid rule
- 🐛 BUG: Serving forms on static pages through `wrangler pages dev` overrides all POST forms as GET requests HOT 1
- 🐛 BUG: Applying the same migration with --local works but with remote doesn't [ERR SQLITE_TOOBIG]
- 🐛 BUG: Exporting local d1 sql to remote fails only when a previous attempt to apply a migration failed.
- 🐛 BUG: `fetchMock` returns an empty url HOT 2
- 🐛 BUG: Queue handler isn't run in vitest-pool-workers integration tests if the name of the queue is configured to anything other than "queue" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workers-sdk.