Multi tenant/ multi projects in Directus #3987
Replies: 4 comments 21 replies
-
The right way? There are a LOT of ways to build it — think of Directus as a database within your stack. |
Beta Was this translation helpful? Give feedback.
-
The way of multitenancy implementation I am thinking about is to move all the API routes under one more folder that woud identify a tenant and use one schema per tenant on DB level. O course there are more places that need to be split onto more tenants (media, custom plugins, ...). I would say it is doable. |
Beta Was this translation helpful? Give feedback.
-
@benhaynes hello and thanks for amazing product! |
Beta Was this translation helpful? Give feedback.
-
Hi guys, what I been doing is to have one Ubuntu server with NodeJS, Nginx, Mysql (LEMP) and run a separate instance of Directus in different port and using Nginx as reverse proxy. This way I only have to maintain one server because each Directus instance connects to their corresponding database. Until here everything works fine, however, I want to migrate to the new Docker installation. I found an interesting example here: #17005 Here is another example running separate yaml file with one command: #6941 but in this case the MySQL database appears to be installed in the host server. So I see 2 cases here (there could be other options as well like the database on an external provider):
I'm wondering which option could be the more optimal in terms of resources usage. With the LEMP approach I ran up to 5-6 Directus instances in a 2GB Ubuntu VPS using like 80% of RAM. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Anyone know the right way to build a Directus 9 stack for multi tenant?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions