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

This commit is contained in:
Nate Aune 2013-09-26 15:38:13 -04:00
parent 063a6332a3
commit 21af4cf2b8
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
web: gunicorn {{cookiecutter.repo_name}}/config/wsgi.py
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