Skip to content

Commit

Permalink
Deploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinsMessias committed Nov 17, 2019
1 parent ba00989 commit b587895
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WEB_CONCURRENCY=2
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ db.sqlite3
migrations
__pycache__
/templates/concept-master/
venv
*.pyc
staticfiles/

17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[requires]
python_version = "3.7"


[packages]
psycopg2-binary = "*"
django-heroku = "*"
gunicorn = "*"
django_currentuser = "*"

[dev-packages]
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn Rentalizze.wsgi
18 changes: 17 additions & 1 deletion Rentalizze/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
"""
Django settings for Rentalizze project.
"""
try:
import django_heroku
import dj_database_url
except ModuleNotFoundError:
pass

import os
from django.core.management.utils import get_random_secret_key
Expand Down Expand Up @@ -118,7 +123,6 @@

USE_TZ = False

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
DEFAULT_CHARSET = 'utf-8'

# Static files (CSS, JavaScript, Images)
Expand All @@ -129,3 +133,15 @@
INPUT_FORMATS = [
'%d/%m/%Y %H:%M',
]


# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')



try:
# Activate Django-Heroku.
django_heroku.settings(locals())
except:
pass

0 comments on commit b587895

Please sign in to comment.