ops_interface/config/config.py
2020-03-20 15:13:16 +08:00

34 lines
740 B
Python

# -*- coding: utf-8 -*-
import os
ad_env = os.getenv('ad_env') or 'prod'
log_path = "/data/logs"
args = dict()
if ad_env == 'prod':
interface_port = 6500
args['host'] = '10.10.3.5'
args['user'] = 'ops'
args['pswd'] = 'deploy2018'
args['db'] = 'ywplatform'
elif ad_env == 'test':
interface_port = 6600
else:
raise Exception("GET config with ad_env failed!")
if not interface_port:
interface_port = 6500
if os.getenv("IS_DEBUG"):
online_mysql = {
"host": '127.0.0.1',
"user": 'root',
"pswd": 'aspect',
"db": 'user_online'
}
else:
online_mysql = {
"host": '10.10.3.5',
"user": 'ops',
"pswd": 'deploy2018',
"db": 'user_online'
}