diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..2aee091 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python manage.py run_gunicorn \ No newline at end of file diff --git a/app/gunicorn_config b/app/gunicorn_config index fb34d96..ca8669c 100644 --- a/app/gunicorn_config +++ b/app/gunicorn_config @@ -4,5 +4,4 @@ from gevent import monkey monkey.patch_all() bind = "127.0.0.1:3322" -workers = 8 -#worker_class = "gunicorn.workers.ggevent.GeventWorker" +workers = 8 diff --git a/app/vapemap/settings.py b/app/vapemap/settings.py index d1bab9b..0c4ae0f 100644 --- a/app/vapemap/settings.py +++ b/app/vapemap/settings.py @@ -1,7 +1,8 @@ import os +import dj_database_url from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS -DEBUG = True +DEBUG = os.environ.get('DJANGO_DEBUG', False) TEMPLATE_DEBUG = DEBUG ADMINS = ( @@ -11,10 +12,7 @@ ADMINS = ( MANAGERS = ADMINS DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(os.path.dirname(__file__), '..', '..', 'db.sqlite3'), - } + 'default': dj_database_url.config(default='sqlite:///%s' % os.path.join(os.path.dirname(__file__), '..', '..', 'db.sqlite3')), } ALLOWED_HOSTS = [ @@ -109,6 +107,7 @@ if DEBUG: ROOT_URLCONF = 'vapemap.urls' WSGI_APPLICATION = 'vapemap.wsgi.application' +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') LOGGING = { 'version': 1, @@ -137,7 +136,7 @@ LOGGING = { HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', - 'URL': 'http://127.0.0.1:9200/', - 'INDEX_NAME': 'haystack', + 'URL': os.environ.get('FOUNDELASTICSEARCH_URL', 'http://127.0.0.1:9200/'), + 'INDEX_NAME': 'vapemap-haystack', }, } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 7282ea2..89ed77b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,9 @@ django-extra-views>=0.6.2 requests pyelasticsearch -e git+git://github.com/toastdriven/django-haystack.git@0e8bd20c18ce3133b3a4f285a4c420bb621ac49b#egg=django_haystack -django-epiceditor \ No newline at end of file +django-epiceditor + +# Heroku +dj-database-url +gunicorn +psycopg2 \ No newline at end of file