Fakultas Ilmu Komputer UI

Commit fd97f45c authored by Annisa Devi Nurmalasari's avatar Annisa Devi Nurmalasari
Browse files

Update settings db

parent 4eea4dee
Pipeline #95588 failed with stages
in 16 seconds
......@@ -42,8 +42,6 @@ Deployment:
before_script:
- gem install dpl
- wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
script:
- dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_API_KEY
- heroku run --app $HEROKU_APP_NAME migrate
......
......@@ -21,6 +21,7 @@ djangorestframework==3.11.0
djangorestframework-camel-case==1.2.0
djangorestframework-simplejwt==4.5.0
djoser==2.0.3
dj-database-url>=0.5.0
gunicorn==20.0.4
idna==2.10
install==1.3.4
......
......@@ -14,6 +14,7 @@ from pathlib import Path
import os
from datetime import timedelta
import environ
import dj_database_url
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -124,14 +125,9 @@ DATABASES = {
}
if PRODUCTION:
DATABASES['default'] = {
"ENGINE": os.environ.get("SQL_ENGINE", "django.db.backends.sqlite3"),
"NAME": os.environ.get("SQL_DATABASE", BASE_DIR / "db.sqlite3"),
"USER": os.environ.get("SQL_USER", "user"),
"PASSWORD": os.environ.get("SQL_PASSWORD", "password"),
"HOST": os.environ.get("SQL_HOST", "localhost"),
"PORT": os.environ.get("SQL_PORT", "5432"),
}
DATABASES['default'] = dj_database_url.config(
conn_max_age=600, ssl_require=True
)
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment