Rails 环境部署(开发/测试和生产)
如何根据网络主机上的文件夹位置设置我的开发/测试/生产应用程序?
我目前有两个文件夹:MyDomainDev 和 MyDomainPro(用于开发/测试和生产)。
我有子域“dev.mydomain.com”指向 dev/test 文件夹,“mydomain.com”指向生产文件夹。这是正确的还是我遗漏了有关开发/测试/生产环境的一些基本内容?
是否真的应该只有一个文件夹,但环境是通过 url 中存在的子域来设置的?
即,“mydomain.com”将环境设置为“生产”,而“dev|test.mydomain.com”将环境设置为“dev|test”?
How do I go about setting up my dev/test/production apps with respect to folder locations on my web host?
I currently have two folders: MyDomainDev and MyDomainPro (for dev/test and production).
I have the subdomain "dev.mydomain.com" point to the dev/test folder and "mydomain.com" pointing to the production folder. Is this correct or am I missing something fundamental with regards to dev/test/production environments?
Should there be really only one folder but that the environment is set by the presence of a subdomain in the url?
i.e., "mydomain.com" sets environment to be 'production' whereas "dev|test.mydomain.com" sets environment to be 'dev|test'?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,将它们放在一台服务器上可能不是一个好主意。如果您刚刚开始,可能没问题。
但也就是说,您可以拥有一个文件夹,但要在每个域的机架设置中指定要运行的环境。您使用什么服务器环境?
First of all, it's probably not a great idea to have them on one server. Probably OK if you're just getting started.
But that said, you can have one folder, but specify the environment to run in the Rack setup for each domain. What server environment are you using?