Any body knows, Using payload cms
1. How to access the data from multiple dbs through cms ?
2. How to switch the dbs at runtime ?
you could see if the following plugin suits your needs:
https://github.com/joas8211/payload-tenancyand
https://github.com/payloadcms/payload/tree/master/examples/multi-tenantI would like to know that as well. If you find out some solution, please let me know
Anyone know how to create custom sub-domains eg tenant1.app.com ?
Multiple database connections from a single payload instance is not currently supported.
This could be an enhancement we address in a later version, but we might never do it.
Your best experience is going to be to run one large DB instance. If you need tenant isolation then you should treat each tenant as a separate instances of node + DB per tenant.
Consider that any relationships are going to be broken if one collection is located in one DB while another is housed somewhere else.
Multi collection queries won't be possible, my brain is exploding thinking about how this would even work.
, Logical Segregation in multi-tenancy sometimes a must, it would be a huge achievement for PayloadCMS if it backs it. Shifting that complexity over infra is a huge cost.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.