From d375bd43a80a2c6d95b096309e42a0fc9fa5287b Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Mon, 26 Aug 2013 19:27:57 -0700 Subject: [PATCH] tweaking settings for compatibility with heroku --- Procfile | 3 ++- runtime.txt | 1 + settings.py | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 runtime.txt diff --git a/Procfile b/Procfile index 8c99d19..ff40e15 100644 --- a/Procfile +++ b/Procfile @@ -1 +1,2 @@ -web: gunicorn heliosserver.wsgi:application -b 0.0.0.0:8000 \ No newline at end of file +web: gunicorn wsgi:application +worker: python manage.py celeryd -E -B --beat \ No newline at end of file diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..dd6a7de --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-2.7.5 diff --git a/settings.py b/settings.py index 2151c15..28f3181 100644 --- a/settings.py +++ b/settings.py @@ -24,6 +24,11 @@ DATABASES = { } } +# override if we have an env variable +if get_from_env('DATABASE_URL', None): + import dj_database_url + DATABASES['default'] = dj_database_url.config() + # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. -- GitLab