Skip to content

Commit

Permalink
move scripts to this file
Browse files Browse the repository at this point in the history
since the env has changed adding / at the end of the vars, the script should be updated as well
  • Loading branch information
coldfire-x committed Jun 7, 2012
1 parent acbf797 commit ed87825
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .openshift/action_hooks/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@
# 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.
# ruby, etc.

source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate

if [ ! -f $OPENSHIFT_DATA_DIR/sqlite3.db ]
then
echo "Copying $OPENSHIFT_REPO_DIR/wsgi/openshift/sqlite3.db to $OPENSHIFT_DATA_DIR"
cp "$OPENSHIFT_REPO_DIR"wsgi/openshift/sqlite3.db $OPENSHIFT_DATA_DIR
else
echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/openshift/manage.py syncdb --noinput'"
python "$OPENSHIFT_REPO_DIR"wsgi/openshift/manage.py syncdb --noinput
fi

echo "Executing 'python $OPENSHIFT_REPO_DIR/wsgi/openshift/manage.py collectstatic --noinput'"
python "$OPENSHIFT_REPO_DIR"wsgi/openshift/manage.py collectstatic --noinput

0 comments on commit ed87825

Please sign in to comment.