Skip to content

Commit

Permalink
Initial deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rinalds98 committed Sep 6, 2023
1 parent 311a509 commit af75b7e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn shorecleanse.wsgi
Binary file modified requirements.txt
Binary file not shown.
22 changes: 16 additions & 6 deletions shorecleanse/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"""

from pathlib import Path
import os
import dj_database_url

if os.path.isfile('env.py'):
import env
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-f4crd!iydg1(ha&q0gyt-%87cls5m%_i8e@)+)meh)4fnnikad'
SECRET_KEY = os.environ.get('SECRET_KEY', '')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
Expand Down Expand Up @@ -74,12 +78,18 @@
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',

if 'DATABASE_URL' in os.environ:
DATABASES = {
'default': dj_database_url.parse(os.environ.get('DATABASE_URL'))
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
}


# Password validation
Expand Down

0 comments on commit af75b7e

Please sign in to comment.