Created
March 15, 2013 16:15
-
-
Save pedroburon/5171062 to your computer and use it in GitHub Desktop.
Post compile hook for django heroku projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eo pipefail | |
# The post_compile hook is run by heroku-buildpack-python | |
echo "-----> I'm post-compile hook" | |
# Work around Heroku bug whereby pylibmc isn't available during | |
# compile phase. See: https://github.com/heroku/heroku-buildpack-python/issues/57 | |
export MEMCACHE_SERVERS='' MEMCACHIER_SERVERS='' | |
if [ -f bin/run_migrations ]; then | |
echo "-----> Running run_migrations" | |
chmod +x bin/run_migrations | |
bin/run_migrations | |
fi | |
if [ -f bin/install_nodejs ]; then | |
echo "-----> Running install_nodejs" | |
chmod +x bin/install_nodejs | |
bin/install_nodejs | |
if [ -f bin/install_less ]; then | |
echo "-----> Running install_lessc" | |
chmod +x bin/install_less | |
bin/install_less | |
fi | |
fi | |
if [ -f bin/run_compress ]; then | |
echo "-----> Running run_compress" | |
chmod +x bin/run_compress | |
bin/run_compress | |
fi | |
echo "-----> Post-compile done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eo pipefail | |
python manage.py syncdb --migrate --noinput 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like the
MEMCACHE_SERVERS
workaround isn't needed now, as of:heroku/heroku-buildpack-python@b891049