Skip to content

Commit

Permalink
modifiction to run heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshsarma committed Jun 14, 2015
1 parent 894ece5 commit 01235b1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: uwsgi uwsgi.ini
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ celery==3.1.18
# -------------------------------------------------
psycopg2==2.6
redis==2.10.3

dj-database-url==0.3.*

# Extensions
# -------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Standard Library
import sys
import os

if "test" in sys.argv:
print("\033[1;91mNo django tests.\033[0m")
Expand All @@ -21,3 +22,8 @@
from .prod import * # noqa
except ImportError:
pass

# heroku

if 'DYNO' in os.environ:
from .heroku import *
7 changes: 7 additions & 0 deletions settings/heroku.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import dj_database_url

DATABASES = {
'default': dj_database_url.config()
}

ALLOWED_HOSTS = ['*']
7 changes: 7 additions & 0 deletions uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[uwsgi]
http-socket = :$(PORT)
master = true
processes = 4
die-on-term = true
module = wsgi
memory-report = true

0 comments on commit 01235b1

Please sign in to comment.