diff --git a/steering/settings.py b/steering/settings.py index 6d3390c4b590825329e6fc1eb2658a9c748311eb..1eaa4e6b14c1adfbd4e9836faa6c16326fbf8183 100644 --- a/steering/settings.py +++ b/steering/settings.py @@ -21,9 +21,8 @@ STATIC_URL = '/static/' ROOT_URLCONF = 'steering.urls' env = environ.Env() -env.read_env(env_file=PROJECT_DIR+'/../.env') +env.read_env(env_file=PROJECT_DIR + '/../.env') -DOCKER = env.bool('RUN_IN_DOCKER', default=True) DEBUG = env.bool('DEBUG', default=False) SITE_ID = 1 ADMINS = () @@ -42,34 +41,16 @@ CORS_ALLOW_HEADERS = list(default_headers) + [ 'content-disposition', ] -# Define which database backend to use for our apps DATABASES = { - # SQLITE - #'default': { - # 'ENGINE': 'django.db.backends.sqlite3', - # 'NAME': os.path.join(PROJECT_DIR, 'dev_data.sqlite'), - #}, - - # PostgreSQL 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': env.str('DBNAME', default='steering'), - 'USER': env.str('DBUSER', default='steering'), - 'PASSWORD': env.str('DBPASS'), - 'HOST': env.str('DBHOST', default='steering-postgres'), - 'PORT': env.str('DBPORT', '5432'), + 'NAME': env.str('POSTGRES_DB', default='steering'), + 'USER': env.str('POSTGRES_USER', default='steering'), + 'PASSWORD': env.str('POSTGRES_PASSWORD'), + 'HOST': env.str('POSTGRES_HOST', default='steering-postgres'), + 'PORT': env.str('POSTGRES_PORT', default='5432'), }, - - # MySQL - # 'default': { - # 'ENGINE': 'django.db.backends.mysql', - # 'OPTIONS': { - # 'read_default_file': os.path.join(PROJECT_DIR, 'mysql.cnf'), - # }, - # }, } -if not DOCKER: - DATABASES['default']['HOST'] = env.str('DBHOST', default='localhost') CACHE_BACKEND = 'locmem://' @@ -186,8 +167,3 @@ LOGIN_URL = '/admin/login/' # Login page OIDC redirects to OIDC_EXTRA_SCOPE_CLAIMS = 'steering.oidc_provider_settings.AuraScopeClaims' # WSGI_APPLICATION = 'steering.wsgi.application'; - -try: - from .local_settings import * -except ImportError: - pass