virtualenv推荐用于django生产服务器? [英] Is virtualenv recommended for django production server?

查看:155
本文介绍了virtualenv推荐用于django生产服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用virtualenv来测试我的应用程序在本地主机,因为我有孤立的环境,并可以安全地测试新版本的包。



现在是时候我必须将我的应用程序部署到生产服务器。我想知道我是否也应该使用virtualenv作为生产服务器,或只是正常的安装应该做。由于它是生产服务器,我可以随时使用我在开发服务器中测试的正确版本(在virtual-env下)

解决方案

如果您认为您将在网络服务器上运行多个项目,则会这样做。一旦你有两个项目,你就有冒险将未来升级的任何python包破坏其他站点。


I have always been using virtualenv for testing my app in localhost since I have isolated environment and can safely test new release of packages.

Now It comes the time when I have to deploy my app to a production server. I am wondering if I should also use virtualenv for production server or just normal installation should do. Since it's production server I can always use the correct version that I tested in the dev server (under virtual-env)

解决方案

I would do it that way if you ever think you'll run more than one project on the webserver. As soon as you have two projects you run the risk of a future upgrade of any python package breaking the other site.

这篇关于virtualenv推荐用于django生产服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆