Giter Site home page Giter Site logo

Comments (6)

marc-barry avatar marc-barry commented on August 17, 2024 2

What I do is the following:

  • Use wrangler publish to publish the actual Worker to our account and under the workers.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.

essensx avatar essensx commented on August 17, 2024 1

It is possible via UI and API directly, we did this as a workaround until feature is implemented

from workers-sdk.

petebacondarwin avatar petebacondarwin commented on August 17, 2024 1

Closing in favour of #669 since we have the feature, just haven't documented it.

from workers-sdk.

c-ameron avatar c-ameron commented on August 17, 2024

Any update on this? I believe this is possible via the UI?

from workers-sdk.

macaws avatar macaws commented on August 17, 2024

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.

threepointone avatar threepointone commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.