-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
- 'PASSWORD': '', # Not used with sqlite3.
- 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+DEBUG = False
+
+if 'DB_NAME' in os.environ:
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+ 'NAME': os.environ['DB_NAME'],
+ 'USER': os.environ.get('DB_USER', ''),
+ 'PASSWORD': os.environ.get('DB_PASSWORD', ''),
+ 'HOST': os.environ.get('DB_HOST', ''),
+ 'PORT': os.environ.get('DB_PORT', ''),
+ }
+ }
+else:
+ DEBUG = True
+
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': '/app/src/cas/dev.sqlite',
+ }