This is a Django project that you can use as the starting point to develop your own and deploy it on an OpenShift cluster.
It assumes you have access to an existing OpenShift installation.
This is a minimal Django 1.8 project. It was created with these steps:
pip freeze > requirements.txtdjango-admin startproject project .project/settings.py to configure SECRET_KEY, DATABASE and STATIC_ROOT entries../manage.py startapp welcome, to create the welcome page's appTo run this project in your development machine, follow these steps:
(optional) Create and activate a virtualenv (you may want to use virtualenvwrapper).
Fork this repo and clone your fork:
git clone https://github.com/openshift/django-ex.git
Install dependencies:
pip install -r requirements.txt
Create a development database:
./manage.py migrate
If everything is alright, you should be able to start the Django development server:
./manage.py runserver
Open your browser and go to http://127.0.0.1:8000, you will be greeted with a welcome page.
[TODO]
.sti/ - scripts used by source-to-image
openshift/ - application templates
The file application-template.json contains an OpenShift application template that you can add you your OpenShift project with:
osc create -f application-template.jsonNow you can browse to your OpenShift web console and create a new app from the 'django-quickstart' template. After adjusting your preferences (or accepting the defaults), your application will be built and deployed.
You will probably want to set the GIT_REPOSITORY parameter to point to your fork.
[TODO]