I've just pushed a new "github-hosted" project : openshift-py
The purpose of this repository is to help in the creation of a simple #Docker container to run a Python2.7 + Flask application for #Openshift.
With the container, you can simply deploy your "work in progress" Openshift application in a docker container to test it, or to pre-deploy it. When you're done, "git push" and the application will run on your Openshift instance.
Running on Docker
Install Docker: http://docker.io
Create an account at https://www.openshift.com
Create a python application
rhc app create myflaskapp python-2.7
Add this upstream flask repo
cd myflaskapp
git remote add upstream -m master https://github.com/lrivallain/openshift-py.git
git pull -s recursive -X theirs upstream master
Then build container image
docker build -q -t lrivallain/openshift-py2.7 .
or get the same image from docker public repository: lrivallain/openshift-py2.7
docker pull lrivallain/openshift-py2.7
And run a container based on this image
docker run -v `pwd`:/data -p 8080:8080 -ti lrivallain/openshift-py2.7
That's it, you can now checkout your application at:
http://127.0.0.1:8080
Running on Openshift
Push change to openshift
git push
That's it, you can now checkout your application at:
http://myflaskapp-$yournamespace.rhcloud.com
Python 2.6
If you prefer to run a docker container for Openshift + Python 2.6 + Flask:
Follow the previous steps, but build container image from python 2.6 Dockerfile:
cd py-2.6
docker build -q -t lrivallain/openshift-py2.6 .
or get the same image from docker public repository: lrivallain/openshift-py2.6
docker pull lrivallain/openshift-py2.6
And run a container based on this image
docker run -v `pwd`:/data -p 8080:8080 -ti lrivallain/openshift-py2.6