deploy 918 Bytes
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
# This deploy hook gets executed after dependencies are resolved and the
# build hook has been run but before the application has been started back
# up again.  This script gets executed directly, so it could be python, php,
# ruby, etc.
set -xe

source ${OPENSHIFT_HOMEDIR}app-root/runtime/dependencies/python/virtenv/bin/activate

pip install -U pip
Jamesie Pic's avatar
Jamesie Pic committed
11
12
pip install -Ue ${OPENSHIFT_REPO_DIR}

13
14
mkdir -p ${OPENSHIFT_DATA_DIR}media

Jamesie Pic's avatar
Jamesie Pic committed
15
pushd ${OPENSHIFT_REPO_DIR}
16
17
18
	if [ -f ${OPENSHIFT_DATA_DIR}sentry ]; then
	    pip install raven
	fi
Jamesie Pic's avatar
Jamesie Pic committed
19

20
21
22
23
24
25
26
27
28
29
30
31
32
	bin/install_client_deps.sh

	mkdir -p wsgi/static

	[ -f memopol/local_settings.py ] && rm memopol/local_settings.py
	cp .openshift/local_settings.py memopol/local_settings.py

	./manage.py migrate --noinput
	./manage.py collectstatic --noinput

	ln -sf ${OPENSHIFT_DATA_DIR}media wsgi/static/media
	ln -sf ${OPENSHIFT_DATA_DIR}compress/CACHE wsgi/static/collected/CACHE
popd