Browse Source

正式环境配置

td_orm
H Vs 1 year ago
parent
commit
20bbf38dd4
2 changed files with 51 additions and 0 deletions
  1. +32
    -0
      HealthMonitor.WebApi/appsettings.production.json
  2. +19
    -0
      setup_production.sh

+ 32
- 0
HealthMonitor.WebApi/appsettings.production.json View File

@@ -0,0 +1,32 @@
{
"AllowedHosts": "*",
"TDengineServiceConfig": {
"Host": "172.19.42.48",
"UserName": "root",
"Password": "taosdata",
"Token": "cm9vdDp0YW9zZGF0YQ==",
"Port": 6030,
"RestPort": 6041,
"DB": "health_monitor"
},
"Redis": {
"Server": "172.19.42.40:8090", // 正式环境
"Password": "telpo#1234",

"DefaultDatabase": 2,
"Prefix": "_HM_",

"Poolsize": 50,

"ConnectTimeout": 5000,
"IdleTimeout": 20000
},
"ServiceConfig": {
"TelpoDataUrl": "https://ai.ssjlai.com/data/"
},
"ConnectionStrings": {
"GpsCard_Connection_String": "server=rm-uf6j529mu0v6g0btp.mysql.rds.aliyuncs.com;port=3305;database=gps_card;uid=root;pwd=telpo#1234;CharSet=utf8;MinimumPoolSize=10;MaximumPoolSize=1000;SslMode=none",
"HealthMonitor_Connection_String": "server=rm-uf6j529mu0v6g0btp.mysql.rds.aliyuncs.com;port=3305;database=health_monitor;uid=root;pwd=telpo#1234;CharSet=utf8;MinimumPoolSize=10;MaximumPoolSize=1000;SslMode=none"

}
}

+ 19
- 0
setup_production.sh View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
image_version=$version
# 删除镜像
docker rmi -f $(
docker images | grep registry.cn-shanghai.aliyuncs.com/health_monitor | awk '{print $3}'
)
# 构建telpo/mrp:$image_version镜像
docker build -f ./HealthMonitor.WebApi/Dockerfile . -t telpo/health_monitor:$image_version
#TODO:推送镜像到阿里仓库
echo '=================开始推送镜像======================='
#docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com
docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com
docker tag telpo/health_monitor:$image_version registry.cn-shanghai.aliyuncs.com/health_monitor:$image_version
docker push registry.cn-shanghai.aliyuncs.com/health_monitor:$image_version
echo '=================推送镜像完成======================='
#删除产生的None镜像
docker rmi -f $(docker images | grep none | awk '{print $3}')
# 查看镜像列表
docker images

Loading…
Cancel
Save