forked from songcser/sanic-ms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
32 lines (25 loc) · 1.09 KB
/
settings.py
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
import os
APP_ID = 'role-service'
HOST = os.environ.get('SERVER_HOST', None)
PORT = os.environ.get('SERVER_PORT', 8020)
DB_CONFIG = {
'host': os.environ.get('POSTGRES_SERVICE_HOST', 'localhost'),
'user': os.environ.get('POSTGRES_SERVICE_USER', 'postgres'),
'password': os.environ.get('POSTGRES_SERVICE_PASSWORD', None),
'port': os.environ.get('POSTGRES_SERVICE_PORT', 5432),
'database': os.environ.get('POSTGRES_SERVICE_DB_NAME', 'postgres')
}
SWAGGER = {
'version': '1.0.0',
'title': 'ROLE API',
'description': 'ROLE API',
'terms_of_service': 'Use with caution!',
'termsOfService': ['application/json'],
'contact_email': '[email protected]'
}
ZIPKIN_SERVER = os.environ.get('ZIPKIN_SERVER', None)
ACCESS_CONTROL_ALLOW_ORIGIN = os.environ.get("ACCESS_CONTROL_ALLOW_ORIGIN", "")
ACCESS_CONTROL_ALLOW_HEADERS = os.environ.get("ACCESS_CONTROL_ALLOW_HEADERS", "")
ACCESS_CONTROL_ALLOW_METHODS = os.environ.get("ACCESS_CONTROL_ALLOW_METHODS", "")
CONSUL_AGENT_HOST = os.environ.get('CONSUL_AGENT_HOST', '127.0.0.1')
CONSUL_AGENT_PORT = os.environ.get('CONSUL_AGENT_PORT', 8500)