Skip to content

Commit

Permalink
Deploy heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarAugusto88 committed Mar 16, 2020
1 parent 59997df commit 788673b
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 39 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cc_env/
.env
cc_env
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn confidencechronograms.wsgi --log-file -
26 changes: 17 additions & 9 deletions confidence_chronogram/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

import os

from decouple import config

from dj_database_url import parse as dburl

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand All @@ -20,12 +24,11 @@
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'lw+n1tz+u*5*mqapv^(bowb%ex_m-7v2khgulr&07_-5j#=sf3'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG', default=False, cast=bool)

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['confidencechronogram.herokuapp.com', '127.0.0.1', 'localhost']


# Application definition
Expand Down Expand Up @@ -74,12 +77,10 @@
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
default_dburl = 'sqlite:///' + os.path.join(BASE_DIR, 'db.sqlite3')

DATABASES = { 'default': config('DATABASE_URL', default=default_dburl, cast=dburl),
}
}


# Password validation
Expand Down Expand Up @@ -119,3 +120,10 @@
# https://docs.djangoproject.com/en/3.0/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

import django_heroku


# Activate Django-Heroku.
django_heroku.settings(locals())
34 changes: 34 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
asgiref==3.2.3
astroid==2.3.3
dj-database-url==0.5.0
Django==3.0.2
dodgy==0.2.1
entrypoints==0.3
flake8==3.7.9
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
mypy==0.770
mypy-extensions==0.4.3
pep8-naming==0.4.1
prospector==1.2.0
pycodestyle==2.4.0
pydocstyle==5.0.2
pyflakes==2.1.1
pylama==7.7.1
pylint==2.4.4
pylint-celery==0.3
pylint-django==2.0.12
pylint-flask==0.6
pylint-plugin-utils==0.6
python-decouple==3.3
pytz==2019.3
PyYAML==5.3
requirements-detector==0.6
setoptconf==0.2.0
six==1.14.0
snowballstemmer==2.0.0
sqlparse==0.3.0
typed-ast==1.4.1
typing-extensions==3.7.4.1
wrapt==1.11.2
32 changes: 3 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
asgiref==3.2.3
astroid==2.3.3
Django==3.0.2
dodgy==0.2.1
entrypoints==0.3
flake8==3.7.9
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
pep8-naming==0.4.1
prospector==1.2.0
pycodestyle==2.4.0
pydocstyle==5.0.2
pyflakes==2.1.1
pylama==7.7.1
pylint==2.4.4
pylint-celery==0.3
pylint-django==2.0.12
pylint-flask==0.6
pylint-plugin-utils==0.6
pytz==2019.3
PyYAML==5.3
requirements-detector==0.6
setoptconf==0.2.0
six==1.14.0
snowballstemmer==2.0.0
sqlparse==0.3.0
typed-ast==1.4.1
wrapt==1.11.2
-r requirements-dev.txt
gunicorn
psycopg2
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.7.6

0 comments on commit 788673b

Please sign in to comment.