Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Using upper with craft CMS multi-site with two domains #47

Open
toddpadwick opened this issue Mar 5, 2021 · 7 comments
Open

Using upper with craft CMS multi-site with two domains #47

toddpadwick opened this issue Mar 5, 2021 · 7 comments
Labels

Comments

@toddpadwick
Copy link

Our site has two domains that return different Craft Multi-sites - a .com domain and a .co.uk domain. We've set up a Cloudflare domain for each. How do we use Upper for both of them? From what I can see there is only room for a single CF domain?

@ostark
Copy link
Owner

ostark commented Mar 5, 2021

Sorry, that's not supported yet. But shouldn't be hard to implement.

@ostark ostark added the feature label Mar 5, 2021
@toddpadwick
Copy link
Author

Ah okay. Do you know of a temporary solution? We're finally launching that 'The Writer' site this afternoon, and the client is noticing that any time they make CMS changes, they don't update on the front end. And it's not feasible for me to purge CF manually every time.
I thought that Craft's native template header would invalid the cache header out of the box, but obviously not :(

@philipzaengle
Copy link

This would be very nice to have :)

@ostark
Copy link
Owner

ostark commented May 6, 2021

@philipzaengle @toddpadwick
Can you provide more details? What's needed to make it happen? Multiple tokens / zone-ids too?
What's the expected purge behaviour?

@philipzaengle
Copy link

@ostark I've not looked at the implementation details of this, so take everything with a grain of salt. But here's my usecase.

Nerd Stuff:
I've got craft managing the content of multiple sites, all using different domains. In my case, these are within the same Cloudflare account -- however, I could see larger clients wanting to use domains from multiple Cloudflare accounts (clients amirite?). This would mean all conf needs to be controlled on a per-site basis -- API-key, zone-id, and domain.

CMS user stuff:
As a CMS user, I would expect that Upper be aware of the site/entry I'm editing and correctly pure the caches. This, of course, is more complicated than it seems due to the flexible nature of Crafts content propagation. I suppose the best solution would be for a purge propagation config option, but the level of effort there seems high.

Solution stuff:
My approach would be to move all settings to a config/upper.php where users could define their settings on a per-site basis.

Sidebar: you're giving this away, so I have zero expectations of this being built / or being a priority. :) If I had the time right now, I'd be submitting a PR.

@adrienne
Copy link

adrienne commented Sep 4, 2021

@ostark - I have the same problem. Two basically separate sites being run from the same multi-site setup. Would like to just be able to configure multiple zone IDs (in our case the same token works fine but multiple tokens is probably also good) and assign each to a Site ID in Craft (so that entries and sections for that site would purge the relevant zone cache).

@ashleybaird
Copy link

@ostark This is an issue I am struggling with now too. Our website is localizing and uses Fastly for caching. We plan to add new domains for each area we are expanding into. Though for our new domain the only way we can purge the cache is by running a Jenkins job to purge the cache of the whole site. This is not sustainable and I was wondering do you plan to add support for multiple Fastly services?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants