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
Loading
......@@ -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
# container, but you use the postgres container for the db and map its port,
# 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 name: steering)
# (default user: steering)
......@@ -47,7 +47,7 @@ DBPASS=change-to-something-secure
# database in its container, but run the steering dev server directly on your
# host. In this case make this False.
# (default: True)
#RUNINDOCKER=
#RUN_IN_DOCKER=
# This should be turned on only for your development environment unless you
# know exactly what you are doing and what the consequences are.
......
......@@ -22,9 +22,8 @@ ROOT_URLCONF = 'pv.urls'
env = environ.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)
SITE_ID = 1
ADMINS = ()
......@@ -69,6 +68,8 @@ DATABASES = {
# },
# },
}
if not DOCKER:
DATABASES['default']['HOST'] = env.str('DBHOST', default='localhost')
CACHE_BACKEND = 'locmem://'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment