This repository is not longer maintained! The OpenShift Online 2 platform has been sunset at September 30th, 2017. Though OpenShift Online 2 has been extended to December 31st, 2017 for those who were already paying customers, it makes no sense to start a new project on this platform.
Wagtail CMS quickstart for deployment on OpenShift Online
- You have an OpenShift account
- You have installed the rhc command line tools for remote OpenShift administration
- You use virtualenv for isolated local python development
- You are familiar with Django basics, at least visited their great online tutorial
Open a terminal and change into your workspace where your code will live
Create your Python-based (
python-2.7orpython-3.3) and PostgreSQL-backed OpenShift application with a single commandrhc app create yourwagtaildemoapp python-2.7 postgresql-9.2 --from-code https://github.com/texperience/wagtail-openshift-quickstart
Great! Your application is deployed and the git repository is cloned locally into yourwagtaildemoapp
Open a terminal session on your application server
rhc ssh -a yourwagtaildemoappCreate a superuser account
python $OPENSHIFT_REPO_DIR/wsgi/wagtail-openshift-quickstart/manage.py createsuperuserClose terminal session
exitEnjoy your remote production site at
http://yourwagtaildemoapp-yourdomain.rhcloud.com(Homepage)http://yourwagtaildemoapp-yourdomain.rhcloud.com/wagtail(Wagtail CMS administration)http://yourwagtaildemoapp-yourdomain.rhcloud.com/django(Django administration)
Congratulations! Now you can manage and publicly view content in your production site!
Prepare your system as documented in the Wagtail docs under Getting started, stop before
pip install wagtailChange directory to your local repository root
cd yourwagtaildemoappInstall necessary python packages (includes all relevant dependencies)
pip install -e .Create and configure a
local_settings.py(copy template fromdata/local_settings.py) located at$HOME/wagtail-openshift-quickstart/confChange directory to your application root
cd wsgi/wagtail-openshift-quickstartInitialize the database structure and data
python manage.py migrateCreate a superuser account
python manage.py createsuperuserRun development server
python manage.py runserverEnjoy your local development site at
http://localhost:8000(Homepage)http://localhost:8000/wagtail(Wagtail CMS administration)http://localhost:8000/django(Django administration)
Let's code! You're ready to develop your Wagtail powered webpages.
That's it! Easy, right? You've set up an OpenShift hosted Wagtail CMS and your local development environment in 10 Minutes! Awesome!