Reputation: 5371
Expanding on this question I am trying to deploy Django on OpenShift but I'm having some problems understanding OpenShift.
I have managed to get as far as setting up a quick app with the git repo https://github.com/openshift/django-example but have the following questions:
I came across this line in Nate Aune's PaaS Bakeoff (slide 42) for setup.py and it looks quite useful:
install_requires=open('%s/project.txt' % \
os.environ.get('OPENSHIFT_REPO_DIR', PROJECT_ROOT)).readlines(),
(because I know I can pip freeze > requirments.txt
in my virtualenv)
... Is %s/project.txt
in wsgi
or tthe directory below wsgi
? Do I have to set PROJECT_ROOT
with some funky os
stuff?
EDIT
Basically:
dev
one) and work there or work off a local copy?manage.py startapp ...
), changing code in your django appIf local is the best option:
git
doesn't do that)Upvotes: 1
Views: 781
Reputation: 11
I was facing a similar situation and found the answer provided by Luis Masuelli to the question posted here very informative. Hope it might help you.
Upvotes: 1
Reputation: 49
I would suggest developing in a local copy. In my experience there is no reason to ssh in, unless if you need to perform one-of operation (migrating databases for example)
The requirements for the openshift app are specified in the setup.py file.
install_requires=['Django>=1.6.0', 'redis>=2.0']
Locally you can of course work in a virtualenv
Upvotes: 4