-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsecret_dev.py
More file actions
49 lines (38 loc) · 1.2 KB
/
secret_dev.py
File metadata and controls
49 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This file is in Git. For local customizations, edit secret.py instead.
import sys
from typing import Dict, Optional
DEBUG = True
REDIS_HOST = "redis"
REDIS_PORT = "6379"
CHANNELS_REDIS_DB = 0
CHANNELS_REDIS_PREFIX = "manager-channels:"
CELERY_BROKER_URL = "redis://{}:{}/2".format(REDIS_HOST, REDIS_PORT)
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": ["redis://{}:{}/{}".format(REDIS_HOST, REDIS_PORT, CHANNELS_REDIS_DB)],
"prefix": CHANNELS_REDIS_PREFIX,
},
}
}
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"HOST": "manager-postgres",
"PORT": "5432",
"NAME": "manager",
"USER": "manager",
"PASSWORD": "pwd",
},
}
# Copied from Ion - figure out a less hacky way to do this
TESTING = "test" in sys.argv
if TESTING:
DATABASES["default"]["ENGINE"] = "django.db.backends.sqlite3"
DATABASES["default"]["NAME"] = ":memory:"
DIRECTOR_APPSERVER_HOSTS = ["orchestrator:5000"]
DIRECTOR_APPSERVER_WS_HOSTS = ["orchestrator:5010"]
SITE_URL_FORMATS: Dict[Optional[str], str] = {
None: "http://127.0.0.1:8081/{}/",
}