Commit 8ed80c4f authored by Stefan Bienert's avatar Stefan Bienert
Browse files

Container: fix container settings

parent eb2f8188
......@@ -5,60 +5,36 @@ from decouple import config
from .base import *
# Bend the broker to the redis container
BROKER_URL = 'redis://cathapi-redis:6379'
CELERY_RESULT_BACKEND = 'redis://cathapi-redis:6379'
# These settings make sure any tasks run in testing
# are run locally with the 'test' database
CELERY_ALWAYS_EAGER = True
TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner'
IS_CELERY = config('I_AM_CELERY', default=False, cast=bool)
if not IS_CELERY:
# These settings are only relevant for Django instances
DEBUG = True
# Bend the Django cache to use the redis container
CACHES["default"]["LOCATION"] = "redis://cathapi-redis:6379/1"
'''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': config('PG_NAME', default='cathapi', cast=str),
'USER': config('PG_USER', default='cathapiuser', cast=str),
'PASSWORD': config('POSTGRES_PASSWORD', cast=str),
'HOST': config('PG_HOST', default='postgres', cast=str),
'PORT': config('PG_PORT', default=5432, cast=int),
}
}
'''
# local database config
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join('/cathapi-data', 'db.sqlite3'),
}
}
INSTALLED_APPS += [
# 'debug_toolbar',
]
STATICFILES_DIRS = [
os.path.join('static/'),
]
STATIC_ROOT = '/static'
#MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
# These settings are only relevant for Django instances
DEBUG = False
# Bend the Django cache to use the redis container
CACHES["default"]["LOCATION"] = "redis://cathapi-redis:6379/1"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': config('POSTGRES_DB', default='cathapi', cast=str),
'USER': config('DJANGO_DB_USR', default='cathapiuser', cast=str),
'PASSWORD': config('DJANGO_DB_CLR_PW', cast=str),
'HOST': config('PG_HOST', default='postgres', cast=str),
'PORT': config('PG_PORT', default=5432, cast=int),
}
}
STATICFILES_DIRS = [
os.path.join('static/'),
]
STATIC_ROOT = '/static'
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