diff options
| -rw-r--r-- | Procfile | 1 | ||||
| -rw-r--r-- | newsdiff/settings/__init__.py | 2 | ||||
| -rw-r--r-- | newsdiff/settings/base.py | 1 | ||||
| -rw-r--r-- | newsdiff/settings/dokku.py | 16 | ||||
| -rw-r--r-- | requirements.txt | 2 |
5 files changed, 22 insertions, 0 deletions
diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..12538f8 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python manage.py run_gunicorn -b 0.0.0.0:$PORT diff --git a/newsdiff/settings/__init__.py b/newsdiff/settings/__init__.py index 33b81ad..c9ac57f 100644 --- a/newsdiff/settings/__init__.py +++ b/newsdiff/settings/__init__.py @@ -4,6 +4,8 @@ if 'EC2' in os.environ: from .ec2 import * if 'HEROKU' in os.environ: from .heroku import * +if 'DOKKU' in os.environ: + from .dokku import * else: try: from .local import * diff --git a/newsdiff/settings/base.py b/newsdiff/settings/base.py index e185a7a..3fb6569 100644 --- a/newsdiff/settings/base.py +++ b/newsdiff/settings/base.py @@ -82,6 +82,7 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', 'django.contrib.admin', + 'gunicorn', 'south', 'storages', 'celery', diff --git a/newsdiff/settings/dokku.py b/newsdiff/settings/dokku.py new file mode 100644 index 0000000..f4783d3 --- /dev/null +++ b/newsdiff/settings/dokku.py @@ -0,0 +1,16 @@ +import dj_database_url + +from os import environ +from .base import * + +ENV = 'dokku' + +ALLOWED_HOSTS = ( + environ.get('PUBLIC_HOSTNAME'), +) + +DATABASES = { + 'default': dj_database_url.config() +} + +DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' diff --git a/requirements.txt b/requirements.txt index ff3e555..620a55b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,9 +7,11 @@ anyjson==0.3.3 beautifulsoup4==4.3.2 billiard==3.3.0.11 celery==3.1.6 +dj-database-url==0.2.2 django-nose==1.2 django-reversion==1.8.0 django-storages==1.1.8 +gunicorn==18.0 honcho==0.5.0 kombu==3.0.7 lxml==3.2.4 |
