...
 
......@@ -4,7 +4,6 @@ metadata:
name: {{ include "p2.fullname" . }}-config
data:
config.yml: |
# Env for Docker images
databases:
default:
engine: django.db.backends.postgresql
......@@ -14,8 +13,10 @@ data:
host: "{{ .Release.Name }}-postgresql"
port: ''
rabbitmq: "p2:{{ .Values.rabbitmq.rabbitmq.password }}@{{ .Release.Name }}-rabbitmq"
redis: ":{{ .Values.redis.password }}@{{ .Release.Name }}-redis-master/0"
cache: "redis://:{{ .Values.redis.password }}@{{ .Release.Name }}-redis-master/0"
message_queue:
broker: "amqp://p2:{{ .Values.rabbitmq.rabbitmq.password }}@{{ .Release.Name }}-rabbitmq"
results: "rpc://"
web:
server.socket_host: 0.0.0.0
......
......@@ -7,8 +7,10 @@ databases:
password: 'EK-5jnKfjrGRm<77'
host: localhost
redis: localhost
rabbitmq: localhost
cache: redis://localhost/0
message_queue:
broker: amqp://localhost/p2
results: rpc://
web:
server.socket_host: 0.0.0.0
......
......@@ -34,9 +34,10 @@ SECRET_KEY = CONFIG.get('secret_key',
'48e9z8tw=_z0e#m*x70&)u%cgo8#=16uzdze&i8q=*#**)@cp&') # noqa Debug
DEBUG = CONFIG.get('debug')
TEST = any('test' in arg for arg in sys.argv)
CORS_ORIGIN_ALLOW_ALL = DEBUG
SECURE_SSL_REDIRECT = not DEBUG
SECURE_SSL_REDIRECT = not DEBUG and not TEST
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
ALLOWED_HOSTS = ['*']
......@@ -94,7 +95,7 @@ ACCOUNT_EMAIL_VERIFICATION = 'none'
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://%s" % CONFIG.get('redis'),
"LOCATION": CONFIG.get('cache'),
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
......@@ -110,8 +111,8 @@ CELERY_TASK_SOFT_TIME_LIMIT = 600
CELERY_BEAT_SCHEDULE = {}
CELERY_CREATE_MISSING_QUEUES = True
CELERY_TASK_DEFAULT_QUEUE = 'p2'
CELERY_BROKER_URL = 'amqp://%s' % CONFIG.get('rabbitmq')
CELERY_RESULT_BACKEND = 'rpc://'
CELERY_BROKER_URL = CONFIG.get('message_queue.broker')
CELERY_RESULT_BACKEND = CONFIG.get('message_queue.results')
CELERY_IMPORTS = (
'p2.core.tasks',
'p2.log.tasks',
......@@ -307,7 +308,6 @@ with CONFIG.cd('log'):
}
TEST = any('test' in arg for arg in sys.argv)
TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
TEST_OUTPUT_VERBOSE = 2
......