Hi @daft and Everybody. I’m about to make OCMS backend multi tenant. I know there are multi tenancy laravel packages but I don’t need one more dependency. October has custom storage paths, custom file upload widget and so on… so even with those packages I would have to handle a lot of things myself.
Below is my check list to do. Do you know any other aspect which I have to take consideration? Thanks is advance for you answer.
-
Create a Middleware to switch tenant, connecting to correct db per tenant based on request’s host (subdomain or domain)
-
Store sessions in db instead of files
-
Separate file uploads per tenant (storage/app/uploads)
-
Separate uploaded media files per tenant (storage/app/media)
-
Separate cache per tenant (storage/framework/cache)
-
Separate logs per tenant (storage/logs)
-
Handle migrations per tenant
-
Handle scheduled jobs, console commands and queue jobs per tenant