via @natea set the python path in the procfile, and use foreman to start the server

This commit is contained in:
Daniel Greenfeld 2013-10-03 10:13:30 +02:00
parent 21518e8977
commit 2afb506061
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
web: python {{cookiecutter.repo_name}}/manage.py run_gunicorn --settings=config.settings -b "0.0.0.0:$PORT" -w 3
web: gunicorn --pythonpath="$PWD/{{cookiecutter.repo_name}}" config.wsgi:application

View File

@ -19,7 +19,7 @@ import os
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
# os.environ["DJANGO_SETTINGS_MODULE"] = "{{ repo_name }}.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ cookiecutter.repo_name }}.config.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Local")
# This application object is used by any WSGI server configured to use this