This instructions are written under the assumption that you have virtualenvwrapper set up on your machine.
You also need working Pusher, Customer.io accounts, and have Docker and Shipyard running on a server somewhere.
-
Create a new virtual env:
mkvirtualenv appsemblerlaunch
-
Set the required env variables in your virtual environments
bin/postactivate
script:#!/usr/local/bin/zsh # This hook is run after this virtualenv is activated. # Django settings export SECRET_KEY='' # Pusher settings export PUSHER_APP_ID='' export PUSHER_APP_KEY='' export PUSHER_APP_SECRET='' # Shipyard settings export SHIPYARD_HOST='' export SHIPYARD_USER='' export SHIPYARD_KEY='' # Customer.io settings export CUSTOMERIO_SITE_ID='' export CUSTOMERIO_API_KEY=''
-
Clone this repo:
git clone [email protected]:appsembler/appsembler-launch.git
-
Switch to the Docker branch:
git checkout docker
-
Activate the virtualenv:
workon appsemblerlaunch
-
cd appsembler-launch; setvirtualenvproject
-
Install the requirements:
pip install -r requirements/local.txt
-
Run syncdb:
./manage.py syncdb --settings=openshift_deploy.settings.local
-
Run migrations:
./manage.py migrate --settings=openshift_deploy.settings.local
-
Start celery in one shell:
./manage.py celery worker -B --loglevel=info --autoreload --settings=openshift_deploy.settings.local --concurrency=2 -s celerybeat-schedule
-
And runserver in other:
./manage.py runserver --settings=openshift_deploy.settings.local