Skip to content

Instantly share code, notes, and snippets.

@allanlei
Created January 16, 2012 21:14
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save allanlei/1623086 to your computer and use it in GitHub Desktop.
Save allanlei/1623086 to your computer and use it in GitHub Desktop.
Sample local Heroku/Django development environment using foreman
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local
port: 8000
procfile: Procfile-development
Running "foreman start" will run start a memcached instance, Django's runserver, watch for SASS/Compass changes, watch for Coffeescript changes.
Modify Procfile-development to fit your needs.
Currently you can't change what type of term signals get pushed to each process in foreman, so if you run run_gunicorn instead of runserver, it has problems quitting because it gets an incorrect signal.
web: python manage.py runserver "0.0.0.0:$PORT" --settings "$DJANGO_SETTINGS_MODULE"
memcached: memcached -m 64 -v
sass: compass --watch
coffeescript: coffee --watch --compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment