/openshift-python-bootstrap

[idle since 2011] Bootstrap script for your OpenShift application

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

OpenShift bootstrap for Python

Why

There's no official documentation from Red Hat about how to write your WSGI application for OpenShift. So I decided to create bootstrap script to prepare your repository for deployment of your Django or Flask application.

Usage

Create your app and virtual enviroment

 rhc-create-app -a <app name>
 cd <bootstrap directory>
 ./bootstrap.py -f <framework> -n <app name> <app directory>/env

If you want to activate virtualenv:

 cd <app directory>
 source env/bin/activate

And if you want to test your app locally

Flask:

 cd <app directory>/wsgi
 ./application

Django:

 cd <app directory>/libs/<app name>
 python manage.py runserver

Thanks