设置 SaaS

发布于 2024-11-05 10:18:43 字数 470 浏览 4 评论 0原文

我正在考虑将 CakePHP 应用程序部署为软件即服务 (SaaS),以便通过一个中央系统简单地提供应用程序的不同实例。

在我的脑海中,这一切都将在一个具有全局帐户和用户模型(habtm)的代码库上运行,并且每个注册的帐户将创建一个全新的数据库(包含所有特定于应用程序的表)以及一些巧妙的引导/重写可在 https://myurl.com/account1/controller/actionhttps://myurl.com/account2/controller/action< /代码>等等。由此产生的一个问题是数据库迁移必须非常小心地处理(即每个客户端数据库都必须进行 1 次更改!)。

这对于 CakePHP 可行吗?如果不行我应该使用什么?项目仍处于起步阶段,所以我对想法持开放态度。看起来令人沮丧的事情之一是让 CakePHP 从不同的数据库(和不同的连接?)访问用户/帐户表。

I am thinking of deploying a CakePHP app as a Software as a Service (SaaS), to simply offer different instances of the app through one central system.

Off the top of my head, this would all run off one code base with a global account and user models (habtm) and each account that would sign up would create a entire new database (with all the app-specific tables) and with some clever bootstrapping/rewrites in place to set the app up at https://myurl.com/account1/controller/action, https://myurl.com/account2/controller/action and so on. One issue that arises from this is that database migrations will have to handled very carefully (ie 1 alteration will have to happen on each clients database!).

Is this feasible with CakePHP? If not what should I use? Project is still in its infancy so I'm open to ideas. One of the things that seems a bleak area is getting CakePHP to access the user/accounts table from a different database (and a different connection?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萧瑟寒风 2024-11-12 10:18:43

您希望拥有多个数据库而不是一个数据库,这是否有原因?按照您提到的方式进行管理和维护是一场噩梦。

您应该能够在一个数据库中完成所有操作。

这也使迁移和更新变得更加简单,并且还消除了有关访问用户帐户的问题,因为它们都在一张表中。

是的,CakePHP 会毫无问题地处理我上面提到的内容。

Is there a reason you are looking to have many databases instead of just one? Doing it the way you mentioned is a nightmare to manage and maintain.

You should be able to do everything in one database.

This also makes migrations and updates much simpler and also removes your issue about access to user accounts b/c they are all in one table.

Yes, CakePHP will handle what I have mentioned above no problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文