Skip to content

Commit

Permalink
Setup Heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
alissatroiano committed Jun 9, 2021
1 parent ae9dd42 commit c0f3614
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Hue/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['https://hue-alissa.herokuapp.com/', 'localhost']

# Application definition

Expand Down Expand Up @@ -131,14 +131,25 @@
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DATABASES = {
'default': {
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }

if 'DATABASE_URL' in os.environ:
DATABASES = {
'default': dj_database_url.parse('postgres://zcunftnrbihayz:60284d7c2a47cb539beb24ff7a73d532ed51e101424c1c5b7732ed1865c15771@ec2-54-87-112-29.compute-1.amazonaws.com:5432/d4c5qrihpvrala')
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators

Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn Hue.wsgi:application
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Django==3.2.2
django-allauth==0.41.0
django-model-utils==4.1.1
django-tables2==2.3.4
gunicorn==20.1.0
idna==2.10
oauthlib==3.1.0
Pillow==8.2.0
Expand Down

0 comments on commit c0f3614

Please sign in to comment.