Base support for Heroku deployment.

This commit is contained in:
2013-04-01 00:23:18 +01:00
parent 572216d10b
commit 7e2ce6fb1a
4 changed files with 14 additions and 10 deletions

1
Procfile Normal file
View File

@@ -0,0 +1 @@
web: python manage.py run_gunicorn

View File

@@ -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

View File

@@ -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',
},
}

View File

@@ -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
django-epiceditor
# Heroku
dj-database-url
gunicorn
psycopg2