Closed thomasjwalsh closed 8 months ago
Yes. I'm developing that feature. I will inform you once it's ready
Nice, that's great news! Did you have a estimated time? If you need a hand I could potentially help too.
Thanks @thomasjwalsh
I will release the feature in the weekend, you can follow the PR https://github.com/hieuhani/nuxt-multi-tenancy/pull/19 I'm trying to figure out more edge cases and update the demo to complete 💪
Hi @thomasjwalsh, I've just published the version 1.2.0, please update and configure as bellow:
export default defineNuxtConfig({
modules: ['nuxt-multi-tenancy'],
multiTenancy: {
tenantDynamicRoute: 'site',
rootDomains: ["nuxtdev.local", "nuxtdev.xyz"],
customDomains: {
"domain-a.com": "domainA",
"domain-B.com": "domainB"
}
},
})
Please let me know if you get any issue. Thanks,
Hi @thomasjwalsh, I've just published the version 1.2.0, please update and configure as bellow:
export default defineNuxtConfig({ modules: ['nuxt-multi-tenancy'], multiTenancy: { tenantDynamicRoute: 'site', rootDomains: ["nuxtdev.local", "nuxtdev.xyz"], customDomains: { "domain-a.com": "domainA", "domain-B.com": "domainB" } }, })
Please let me know if you get any issue. Thanks,
Hi @hieuhani, that's awesome! I'll give it go and let you know how.
Hi @thomasjwalsh, I've just published the version 1.2.0, please update and configure as bellow:
export default defineNuxtConfig({ modules: ['nuxt-multi-tenancy'], multiTenancy: { tenantDynamicRoute: 'site', rootDomains: ["nuxtdev.local", "nuxtdev.xyz"], customDomains: { "domain-a.com": "domainA", "domain-B.com": "domainB" } }, })
Please let me know if you get any issue. Thanks,
This looks super awesome!
Hopefully not abusing the thread, but I have a couple of questions for a use case for this feature: I'd like users to be able to add a custom domain themselves to their own created areas. With that in mind:
Or is this not how this module was intended to be used?
Hi @conorseed,
Would users just point their custom domain by A record to the same A record as the server?
Yes.
How might SSL certs be issued for those additional domains?
To me, because I control all my domains so I use Cloudflare SSL. You can write the automated script using Certbot to accomplish.
Is it possible to add/remove customDomains dynamically into the config? i.e. when a user adds or removes the domain from their settings?
I'm thinking, but I would want to propose some ideas to go with:
First, we need somewhere to store the user's custom domain mapping (can be persisted in the database). Then adding a new Nuxt middleware to determine the request domain to which tenant site. Or instead of Nuxt middleware you can use a proxy server.
I was wondering if there is a way to use nuxt-multi-tenancy with domains instead of subdomains. I'm more interested in using it like:
Nuxt would then only serve pages from domainA for the domainA.com and domainB for the domainB.com. Is that possible?
Thanks for any info, Tom