Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use multi tenancy? #569

Open
yeyenpamula opened this issue Jul 25, 2024 · 3 comments
Open

How to use multi tenancy? #569

yeyenpamula opened this issue Jul 25, 2024 · 3 comments
Labels

Comments

@yeyenpamula
Copy link

@chriskapp How to use multi-tenancy? I've read the documentation and not found information about multi-tenancy.

@chriskapp
Copy link
Member

@yeyenpamula there is indeed no documentation for this, I will try to add this with the next documentation update, but in general it is very easy, there is a APP_TENANT_ID environment variable which contains the identifier for each tenant, i.e. you could setup different sub-domains i.e. customer-a.acme.com and customer-b.acme.com and depending on the sub-domain you set the fitting APP_TENANT_ID.

Then in order for a user to use a tenant you need to setup the tenant s.
https://www.fusio-project.org/api/backend#tag/tenant/operation/backend.tenant.setup
and if not longer needed you can also remove the tenant
https://www.fusio-project.org/api/backend#tag/tenant/operation/backend.tenant.remove

All you sub-domains can then be server from the same Fusio instance and database. You can also integrate the tenant id in your app by using i.e. the $context->getTenantId().

@yeyenpamula
Copy link
Author

@chriskapp Thank you for answering. But I'm still confused.

Is there an example or easier explanation?

Should I install fusio on all my tenants?

@chriskapp
Copy link
Member

@yeyenpamula unfortunately not, you would then need to wait for the documentation update.

Should I install fusio on all my tenants?

No, basically the tenant feature exist only so that you can install Fusio on a single server and serve multiple clients, which can be great to save costs. But the tenant feature is only useful, if you want to basically run a dedicated instance for each customer on a domain. Maybe you don`t need this if you simply build an app where your users register.

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

No branches or pull requests

2 participants