Commit 7e0e11d8 by xmh

<fix> 校时配置

<feat> 配置文件添加版本号
1 parent a1779dca
......@@ -27,6 +27,8 @@ spring:
# 服务注册标识,格式为:应用名称:服务器IP:端口
instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.ip-address}:${server.port}
ip-address: 192.168.9.146
metadata:
version: 3.0.1-SNAPSHOT
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.9.233:3306/fanxing3?serverTimezone=Asia/Shanghai
......
......@@ -49,6 +49,8 @@ spring:
# 服务注册标识,格式为:应用名称:服务器IP:端口
instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.ip-address}:${server.port}
ip-address: 192.168.9.146
metadata:
version: 3.0.1-SNAPSHOT
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.9.233:3306/fanxing3
......
......@@ -59,6 +59,7 @@ public class ContentServiceImpl extends BaseServiceImpl<Content> implements Cont
content.setName(TIMING_CONFIG);
content.setType(PLATFORM_CONFIG);
content.setContent(jsonObject.toJSONString());
contentMapper.insertSelective(content);
}
// todo 发给运维服务
......
......@@ -27,6 +27,8 @@ spring:
# 服务注册标识,格式为:应用名称:服务器IP:端口
instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.ip-address}:${server.port}
ip-address: 192.168.9.146
metadata:
version: 3.0.1-SNAPSHOT
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.9.233:3306/fanxing3
......
......@@ -27,6 +27,8 @@ spring:
# 服务注册标识,格式为:应用名称:服务器IP:端口
instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.ip-address}:${server.port}
ip-address: 192.168.9.146
metadata:
version: 3.0.1-SNAPSHOT
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.9.233:3306/fanxing3
......
......@@ -27,6 +27,8 @@ spring:
# 服务注册标识,格式为:应用名称:服务器IP:端口
instance-id: ${spring.application.name}:${spring.cloud.consul.discovery.ip-address}:${server.port}
ip-address: 192.168.9.146
metadata:
version: 3.0.1-SNAPSHOT
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.9.233:3306/fanxing3
......
......@@ -42,4 +42,52 @@ server {
rewrite ^/api/video-cloud/(.*) /$1 break;
proxy_pass http://192.168.9.233:8888/;
}
}
# grafana
server {
listen 33000;
location / {
proxy_pass http://192.168.9.233:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header 'Access-Control-Allow-Origin';
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials 'true';
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin,X-Requested-With,Content-Type,Accept,Authorization,Referer,User-Agent,x-grafana-org-id';
if ( $request_method = 'OPTIONS' ) {
return 200;
}
}
}
# prometheus
server {
listen 39090;
location / {
proxy_pass http://192.168.9.233:9090;
}
}
# consul
server {
listen 38500;
location / {
proxy_pass http://192.168.9.233:8500;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header 'Access-Control-Allow-Origin';
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials 'true';
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers 'Origin,X-Requested-With,Content-Type,Accept,Authorization,Referer,User-Agent,x-grafana-org-id';
if ( $request_method = 'OPTIONS' ) {
return 200;
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!