Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 2.14 KB

README.OPENSHIFT.md

File metadata and controls

33 lines (24 loc) · 2.14 KB

#Runtime Configuration This will easily create an Openshift diy-0.1 app with Python 3.5.1 & Django 1.9.7 & uWSGI using PostgresSQL for it's backend in only a few commands.

rhc create app -a <app_name> -t diy-0.1
cd app_name

The rhc tool doesn't always create the app folder for me and I've run into issues with it building now that I'm on an upgraded account. You can also make the DIY cartridge through the web, clone it to your local machine, and once you are in the git repo directory finish with the following commands. Also at this point before you use the following commands, you should add a PostgresSQL 9.2 cartridge to your cartridge. You can do that with the command below or through the web portal.

rhc cartridge add -c postgresql-9.2 -a <app-name>
git remote add upstream -m master [email protected]:CSUChico-CINS465/Openshift_DIY_Latest_Python3_and_Django.git
git pull -s recursive -X theirs upstream master
git push

And watch the scripts do their thing. This will take a while and will result in a ton of text in your terminal window. If you want to reduce this you can make the compilation of Python3.5.1 silent by changing the lines in the .openshift/action_hooks/pre_build script that say make install to instead read as follows, as this will pipe this output to /dev/null instead of to the terminal:

make install > /dev/null

Once the scripts are done, you should have a running Django webserver that's singular home view will display the system python version at your cartridge's web address.

You can also work on the local copy as a development version of the site that uses a sqlite backend. Due to openshift2's nature you'll need to make migrations on the development server and push them to the remote server for changes to happen on the remote.

This code was cobbled together from openshift code examples found at the following sites: