3 ms·
One solution would be to dockerize your current setup and then spin a container for each school. Then with nginx, point example.com/school1 to its correspondin
by pricci 5y ago
One solution would be to dockerize your current setup and then spin a container for each school.
Then with nginx, point example.com/school1 to its corresponding container.
- chirau 5y agoThank you. What about data isolation? Would each containerized app have its own database or would all of them be reading from the same master?
- aliasEli 5y agoIf you are in the EU I would definitely advise to use separate databases due to privacy laws (GDPR). This also keeps your database and queries simpler because you don't need to use a separate a separate tenant ID column.
- pricci 5y agoThat would be your decision to make. It is actually easier to have a separate db for each.
- gtsteve 5y agoThis is reasonable in the short term. Pros: You can probably make it work in a day or two Cons: You now have to manage resources for each school. With dozens it's no big deal, but with tens of thousands you've got a considerable deployment problem. I have worked at a company that started with a few single-tenant instances and ended up with a thousand. We ended up building software to specifically manage deployments, do healthchecks, ensure isolation etc (it was a long time ago - I expect we'd just run a giant kube farm today). So, this is a reasonable approach with a painful trade-off as you scale. I would do this in the short term whilst working on refactoring this into a multi-tenant app.