Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Wagtail CMS quickstart for deployment on OpenShift

License

Notifications You must be signed in to change notification settings

texperience/wagtail-openshift-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wagtail-openshift-quickstart

Wagtail CMS quickstart for deployment on OpenShift Online

Prerequisites

Recommendations

Getting started

Initialize openshift application and local codebase

  • Open a terminal and change into your workspace where your code will live

  • Create your Python-based and PostgreSQL-backed OpenShift application with a single command

    rhc app create yourwagtaildemoapp python-2.7 postgresql-9.2 --from-code https://github.com/timorieber/wagtail-openshift-quickstart

Great! Your application is deployed and the git repository is cloned locally into yourwagtaildemoapp

Initialize local development environment

  • Prepare your system as documented in the Wagtail docs under Getting started, stop before pip install wagtail

  • Change directory to your local repository root

    cd yourwagtaildemoapp

  • Install necessary python packages (includes all relevant dependencies)

    pip install -e .

  • Create and configure a local_settings.py (copy template from data/local_settings.py) located at $HOME/wagtail-openshift-quickstart-local/conf

  • Change directory to your application root

    cd wsgi/wagtail-openshift-quickstart

  • Initialize the database structure and data

    python manage.py migrate

  • Create a superuser account

    python manage.py createsuperuser

  • Run development server

    python manage.py runserver

  • Enjoy your local development site at

    http://localhost:8000 (Homepage)

    http://localhost:8000/wagtail (Wagtail CMS administration)

    http://localhost:8000/django (Django administration)

Congratulations! You're ready to develop your Wagtail powered webpages.

Prepare OpenShift environment

  • Open a terminal session on your application server

    rhc ssh -a yourwagtaildemoapp

  • Change directory to your repository root

    cd $OPENSHIFT_REPO_DIR

  • Install necessary python packages (includes all relevant dependencies)

    python setup.py install

  • Change directory to your application root

    cd wsgi/wagtail-openshift-quickstart

  • Initialize the database structure and data

    python manage.py migrate

  • Collect and organize static files

    python manage.py collectstatic

  • Create a superuser account

    python manage.py createsuperuser

  • Close terminal session

    exit

  • Restart your application

    rhc app restart -a yourwagtaildemoapp

  • Enjoy 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)

That's it! Easy, right? You've set up an Openshift hosted Wagtail CMS and your local development environment in 10 Minutes! Awesome!