Skip to content

Commit ed87825

Browse files
committedJun 7, 2012
move scripts to this file
since the env has changed adding / at the end of the vars, the script should be updated as well
1 parent acbf797 commit ed87825

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed
 

‎.openshift/action_hooks/deploy

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,18 @@
22
# This deploy hook gets executed after dependencies are resolved and the
33
# build hook has been run but before the application has been started back
44
# up again. This script gets executed directly, so it could be python, php,
5-
# ruby, etc.
5+
# ruby, etc.
6+
7+
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate
8+
9+
if [ ! -f $OPENSHIFT_DATA_DIR/sqlite3.db ]
10+
then
11+
echo "Copying $OPENSHIFT_REPO_DIR/wsgi/openshift/sqlite3.db to $OPENSHIFT_DATA_DIR"
12+
cp "$OPENSHIFT_REPO_DIR"wsgi/openshift/sqlite3.db $OPENSHIFT_DATA_DIR
13+
else
14+
echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/openshift/manage.py syncdb --noinput'"
15+
python "$OPENSHIFT_REPO_DIR"wsgi/openshift/manage.py syncdb --noinput
16+
fi
17+
18+
echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/openshift/manage.py collectstatic --noinput'"
19+
python "$OPENSHIFT_REPO_DIR"wsgi/openshift/manage.py collectstatic --noinput

0 commit comments

Comments
 (0)
Please sign in to comment.