Commit 20e5f79a authored by 金凯强's avatar 金凯强 🎨

nginx配置修改

parent ce8de9c3
Pipeline #28942 canceled with stage
in 0 seconds
......@@ -6,10 +6,10 @@ now_time=`date +%Y%m%d_%H%M%S`
python -u load_handle.py > ${now_time}.log
sleep 3
# sleep 3
python -u analysis_file_to_hsright.py
# python -u analysis_file_to_hsright.py
sleep 3
# sleep 3
python -u analysis_file_to_nginx.py
\ No newline at end of file
# python -u analysis_file_to_nginx.py
\ No newline at end of file
......@@ -4,6 +4,29 @@ import os
import re
if __name__ == '__main__':
# 同步配置nginx配置
app_conf_path = '/huansi/upgrade/app.conf'
rpc_conf_path = '/huansi/upgrade/rpc.conf'
os.system('mkdir -p /data/nginx/conf/')
if os.path.exists(app_conf_path):
with open(app_conf_path, 'r')as f:
app_conf_content = f.read()
app_conf_content = app_conf_content.replace('$service_ip', '172.17.0.1')
with open('/data/nginx/conf/app.conf', 'w')as f:
f.write(app_conf_content)
if os.path.exists(rpc_conf_path):
with open(rpc_conf_path, 'r')as f:
rpc_conf_content = f.read()
rpc_conf_content = rpc_conf_content.replace('$service_ip', '172.17.0.1')
with open('/data/nginx/conf/rpc.conf', 'w')as f:
f.write(rpc_conf_content)
with os.popen('ls | grep .tar') as f:
cmd_txt = f.read()
......
Markdown is supported
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