asked 2012-04-08 08:12:42 -0500zaf
I have deployed (in Webfaction) a development environment for askbot in which I commit everyday's updates from both askbot's repo and few local environments. I want now to create two more environments, a testing one and of course the production one. The three environments will have different source code and different databases, running in the same server in domains like
dev.server.com, test.server.com and
I would do this easily for the other 2 environments by following the same instructions but I see that in
lib/python2.6 there is a
askbot-0.7.40-py2.6.egg folder, so I was wondering that if I install another 2 instances they will override the same folder.
Is this true? How can I prevent this, in order to install three separate environments.
Thanks a lot
answered 2012-04-21 11:00:45 -0500zaf
The solution for this is just to use virtual environments, so that each one is isolated from the others. To do this, there is a tool
virtualenv, easily installed by
easy_install virtualenv, and even more easily used by
virtualenv <projectNameDir>. This way, nothing is stored on the common
site-packages, and files under
<projectNameDir> have their own
site-packages and are isolated, so you can have many environments in the same server.
Note: When you are inside
<projectNameDir> and you run your commands like 'python manegy.py ...' make sure to use python (and any other tools) found at bin folder of your virtual environment. So you will end up running commands like
../bin/python manage.py syncdb
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2012-04-08 08:12:42 -0500
Seen: 77 times
Last updated: Apr 21 '12