Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Commit

Permalink
setup for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyFaist committed Apr 29, 2019
1 parent 3efa7b8 commit b09ea6d
Show file tree
Hide file tree
Showing 5 changed files with 51 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: gunicorn djangowiki.wsgi --preload --log-file -
28 changes: 28 additions & 0 deletions dynowiki/settings/heroku.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""
Production Settings for Heroku
"""

import environ
from dynowiki.settings.dev import *

env = environ.Env(
# set casting, default value
DEBUG=(bool, False)
)
# reading .env file
environ.Env.read_env()

# False if not in os.environ
DEBUG = env('DEBUG')

# Raises django's ImproperlyConfigured exception if SECRET_KEY not in os.environ
SECRET_KEY = env('SECRET_KEY')

ALLOWED_HOSTS = env.list('ALLOWED_HOSTS')
print(ALLOWED_HOSTS)

# Parse database connection url strings like psql://user:pass@127.0.0.1:8458/db
DATABASES = {
# read os.environ['DATABASE_URL'] and raises ImproperlyConfigured exception if not found
'default': env.db(),
}
2 changes: 1 addition & 1 deletion dynowiki/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@

# Simplified static file serving.
# https://warehouse.python.org/project/whitenoise/
# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
20 changes: 20 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bleach==2.1.4
Django==2.1.8
django-classy-tags==0.8.0
django-environ==0.4.5
django-js-asset==1.2.2
django-mptt==0.9.1
django-nyt==1.1.2
django-sekizai==1.0.0
gunicorn==19.9.0
html5lib==1.0.1
Markdown==2.6.11
Pillow==6.0.0
psycopg2==2.8.2
pytz==2019.1
six==1.12.0
sorl-thumbnail==12.5.0
sqlparse==0.3.0
webencodings==0.5.1
whitenoise==4.1.2
wiki==0.4.4
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.7.3

0 comments on commit b09ea6d

Please sign in to comment.