we are using openshift as our mobile app's backend since we don't have much resource and money to buy a server for hosting this backend site. It's a great Pass platform for developers saving much headaches. Every account has one domain associated, we can create 3 apps under it, e.g. you create a domain map, and then create a app social, the application's full URL will be social-map.rhcloud.com. You can check its features in
http://openshift.redhat.com .
Django is our backend web framework, and there's a quick start example in github(
github.com/openshift/django-example), you can just clone this repo, and push it to your repo, then openshift will deploy it for you.
But we decided to do it ourselves(why we need those unrelated dirs, codes, it's really annoying), it's very easy. Here are some steps:
1, clone your app repo into local working directory, when you create an app, openshift will create a git repo for you, and you can add other remote repos, and push/pull from there, it's up to you.
2, edit setup.py, add 'Django>=1.3' into install_requires
3, use django-admin.py creating a new project under your working directory, there will be one wsgi file generated, after step 4, you can delete this
4, edit wsgi/application file, you can setup environment vars there, the important thing is help it finding your site's setting.py
5, ok, you have done the setup stuff, now you can continue your coding, and then push it to openshift
ps, our directory structure:
.
|-- data
|-- libs
|-- socialmap (this is our django project)
| |-- accounts
| | `-- avatars
| `-- templates
`-- wsgi (wsgi file application mentioned in step4 is in this directory)
`-- static
`-- admin
|-- css
|-- img
| `-- gis
`-- js
`-- admin