Skip to content
Snippets Groups Projects
Commit 4eb41ea1 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

adapt settings for docker setup; remove debug line

parent 401266cf
No related branches found
No related tags found
1 merge request!13Adaptation for an AuRa wide docker setup
...@@ -21,7 +21,7 @@ SECRET_KEY=put-something-awesomely-random-here ...@@ -21,7 +21,7 @@ SECRET_KEY=put-something-awesomely-random-here
# if you use a dev environment where django is not running inside a docker # if you use a dev environment where django is not running inside a docker
# container, but you use the postgres container for the db and map its port, # container, but you use the postgres container for the db and map its port,
# then use localhost as the database hostname # then use localhost as the database hostname
# (default host: steering-postgres) # (default host: steering-postgres ; or if RUN_IN_DOCKER is False: localhost)
# (default port: 5432) # (default port: 5432)
# (default name: steering) # (default name: steering)
# (default user: steering) # (default user: steering)
...@@ -47,7 +47,7 @@ DBPASS=change-to-something-secure ...@@ -47,7 +47,7 @@ DBPASS=change-to-something-secure
# database in its container, but run the steering dev server directly on your # database in its container, but run the steering dev server directly on your
# host. In this case make this False. # host. In this case make this False.
# (default: True) # (default: True)
#RUNINDOCKER= #RUN_IN_DOCKER=
# This should be turned on only for your development environment unless you # This should be turned on only for your development environment unless you
# know exactly what you are doing and what the consequences are. # know exactly what you are doing and what the consequences are.
......
...@@ -22,9 +22,8 @@ ROOT_URLCONF = 'pv.urls' ...@@ -22,9 +22,8 @@ ROOT_URLCONF = 'pv.urls'
env = environ.Env() env = environ.Env()
env.read_env(env_file=PROJECT_DIR+'/../.env') env.read_env(env_file=PROJECT_DIR+'/../.env')
env.str('DBHOST')
DOCKER = env.bool('DOCKER', default=True) DOCKER = env.bool('RUN_IN_DOCKER', default=True)
DEBUG = env.bool('DEBUG', default=False) DEBUG = env.bool('DEBUG', default=False)
SITE_ID = 1 SITE_ID = 1
ADMINS = () ADMINS = ()
...@@ -69,6 +68,8 @@ DATABASES = { ...@@ -69,6 +68,8 @@ DATABASES = {
# }, # },
# }, # },
} }
if not DOCKER:
DATABASES['default']['HOST'] = env.str('DBHOST', default='localhost')
CACHE_BACKEND = 'locmem://' CACHE_BACKEND = 'locmem://'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment