N
Nuxt2w ago
Mafia

Multi sub domain frontend

Hi, I’m working on a project for a client who wants multiple frontends for different sectors of the business. For ease I will call each a tenant. I plan to use something like strapi to manage content which will generate a static site and be deployed via a webhook. Is there an easy way to dynamically deploy tenants via Cloudflare pages? I did find this: https://github.com/hieuhani/nuxt-multi-tenancy However wondered if anyone had any thoughts on how to mange this dynamically before I take the plunge.
GitHub
GitHub - hieuhani/nuxt-multi-tenancy: Nuxt Multi Tenancy Module - m...
Nuxt Multi Tenancy Module - multi-tenancy by sub domain for Nuxt application - hieuhani/nuxt-multi-tenancy
2 Replies
kapa.ai
kapa.ai2w ago
Hi @Mafia. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I can offer some insights on multi-tenant deployment with Nuxt and Cloudflare Pages, though the information is somewhat limited for your specific use case. Here's what I can share: 1. Cloudflare Pages Support: Nuxt has first-class integration with Cloudflare Pages, which allows for zero-configuration deployment. This is mentioned in the Hosting Providers documentation. 2. Edge-Side Rendering: Cloudflare Pages supports Edge-Side Rendering (ESR) for Nuxt applications, which could be beneficial for your multi-tenant setup. This is detailed in the Edge-Side Rendering documentation. 3. Dynamic Deployment: While the knowledge sources don't provide specific information about dynamically deploying multiple tenants, Nuxt's integration with Cloudflare might offer some flexibility. You could potentially use Cloudflare's API or Workers to manage deployments programmatically. 4. Multi-Tenant Considerations: The cache.varies option in Nitro's routeRules can be useful for multi-tenant implementations, as mentioned in a GitHub pull request. This could help in managing caching strategies for different tenants. 5. Static Site Generation: Nuxt supports static site generation, which aligns with your plan to generate static sites from Strapi content. You can use the nuxi generate command for this purpose, as explained in the Static Hosting documentation. However, the knowledge sources don't provide specific information on dynamically managing multiple tenants via Cloudflare Pages. The GitHub repository you mentioned (nuxt-multi-tenancy) is not covered in the provided knowledge sources, so I can't comment on its effectiveness or compare it to other solutions. For a more comprehensive answer to your specific use case, you might need to explore Cloudflare Pages documentation directly or consult with Cloudflare support about dynamic tenant deployment capabilities. Additionally, you may want to investigate Nuxt's layer system, which could potentially be used to manage different configurations for each tenant, though this would require further research beyond the provided knowledge sources. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@137902619531149312> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?