From 2afb506061d06de3baacb9287401ec1c6f1545ed Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Thu, 3 Oct 2013 10:13:30 +0200 Subject: [PATCH] via @natea set the python path in the procfile, and use foreman to start the server --- {{cookiecutter.repo_name}}/Procfile | 2 +- .../{{cookiecutter.repo_name}}/config/wsgi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.repo_name}}/Procfile b/{{cookiecutter.repo_name}}/Procfile index 0a678489..ada25676 100644 --- a/{{cookiecutter.repo_name}}/Procfile +++ b/{{cookiecutter.repo_name}}/Procfile @@ -1 +1 @@ -web: python {{cookiecutter.repo_name}}/manage.py run_gunicorn --settings=config.settings -b "0.0.0.0:$PORT" -w 3 \ No newline at end of file +web: gunicorn --pythonpath="$PWD/{{cookiecutter.repo_name}}" config.wsgi:application \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/wsgi.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/wsgi.py index 0225ba19..f2f5b8fb 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/wsgi.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/wsgi.py @@ -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