Browse Source

🎉 2.8.0.RELEASE

test
smallchill 4 years ago
parent
commit
7f349b24ee
  1. 2
      blade-biz-common/pom.xml
  2. 2
      blade-example-api/blade-dubbo-provider-api/pom.xml
  3. 2
      blade-example-api/blade-stream-api/pom.xml
  4. 4
      blade-example-api/pom.xml
  5. 2
      blade-example/blade-dubbo-consumer/pom.xml
  6. 2
      blade-example/blade-dubbo-provider/pom.xml
  7. 2
      blade-example/blade-easypoi/pom.xml
  8. 2
      blade-example/blade-mq-kafka/pom.xml
  9. 2
      blade-example/blade-mq-rabbit/pom.xml
  10. 2
      blade-example/blade-seata-order/pom.xml
  11. 2
      blade-example/blade-seata-storage/pom.xml
  12. 2
      blade-example/blade-stream-consumer/pom.xml
  13. 2
      blade-example/blade-stream-provider/pom.xml
  14. 2
      blade-example/blade-websocket/pom.xml
  15. 4
      blade-example/pom.xml
  16. 2
      blade-gateway/pom.xml
  17. 6
      blade-gateway/src/main/java/org/springblade/gateway/filter/GlobalRequestLogFilter.java
  18. 4
      blade-gateway/src/main/java/org/springblade/gateway/filter/GlobalResponseLogFilter.java
  19. 2
      blade-service-api/blade-demo-api/pom.xml
  20. 4
      blade-service-api/pom.xml
  21. 8
      blade-service/blade-demo/pom.xml
  22. 2
      blade-service/blade-demo/src/main/java/com/example/demo/controller/UploadController.java
  23. 4
      blade-service/pom.xml
  24. 24
      doc/nacos/blade-dev.yaml
  25. 3
      doc/nacos/blade-prod.yaml
  26. 3
      doc/nacos/blade-test.yaml
  27. 28
      doc/nacos/blade.yaml
  28. 6
      pom.xml
  29. 2
      script/docker/app/.env
  30. 70
      script/docker/app/deploy.sh
  31. 175
      script/docker/app/docker-compose.yml
  32. 4
      script/docker/app/nginx/web/nginx.conf

2
blade-biz-common/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example-api/blade-dubbo-provider-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example-api</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example-api/blade-stream-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example-api</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-example-api/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-example-api</artifactId>
<name>${project.artifactId}</name>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务范例API集合</description>

2
blade-example/blade-dubbo-consumer/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-dubbo-provider/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-easypoi/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-mq-kafka/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-mq-rabbit/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-seata-order/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-seata-storage/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-stream-consumer/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-stream-provider/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

2
blade-example/blade-websocket/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-example</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-example/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-example</artifactId>
<name>${project.artifactId}</name>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务范例集合</description>

2
blade-gateway/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

6
blade-gateway/src/main/java/org/springblade/gateway/filter/GlobalRequestLogFilter.java

@ -19,7 +19,7 @@ package org.springblade.gateway.filter;
import io.jsonwebtoken.Claims;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.springblade.core.jwt.JwtUtil;
import org.springblade.gateway.provider.AuthProvider;
import org.springblade.gateway.provider.RequestProvider;
@ -93,9 +93,9 @@ public class GlobalRequestLogFilter implements GlobalFilter, Ordered {
beforeReqArgs.add((claims == null) ? "" : claims.toString());
beforeReqLog.append("===Headers=== {}: {}\n");
beforeReqArgs.add(headerName.concat("-original"));
beforeReqArgs.add(StringUtils.join(headerValue));
beforeReqArgs.add(StringUtils.join(headerValue.toArray()));
} else {
beforeReqArgs.add(StringUtils.join(headerValue));
beforeReqArgs.add(StringUtils.join(headerValue.toArray()));
}
});

4
blade-gateway/src/main/java/org/springblade/gateway/filter/GlobalResponseLogFilter.java

@ -18,7 +18,7 @@ package org.springblade.gateway.filter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
@ -82,7 +82,7 @@ public class GlobalResponseLogFilter implements GlobalFilter, Ordered {
headers.forEach((headerName, headerValue) -> {
responseLog.append("===Headers=== {}: {}\n");
responseArgs.add(headerName);
responseArgs.add(StringUtils.join(headerValue));
responseArgs.add(StringUtils.join(headerValue.toArray()));
});
responseLog.append("================ Gateway Response End =================\n");

2
blade-service-api/blade-demo-api/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

4
blade-service-api/pom.xml

@ -5,14 +5,14 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-service-api</artifactId>
<name>${project.artifactId}</name>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务API集合</description>

8
blade-service/blade-demo/pom.xml

@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -27,7 +27,11 @@
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-all</artifactId>
<artifactId>blade-starter-oss</artifactId>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>

2
blade-service/blade-demo/src/main/java/com/example/demo/controller/UploadController.java

@ -5,7 +5,7 @@ import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.boot.file.LocalFile;
import org.springblade.core.oss.minio.MinioTemplate;
import org.springblade.core.oss.MinioTemplate;
import org.springblade.core.oss.model.BladeFile;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.PostMapping;

4
blade-service/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
</parent>
<artifactId>blade-service</artifactId>
<name>${project.artifactId}</name>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
<packaging>pom</packaging>
<description>BladeX 微服务集合</description>

24
doc/nacos/blade-dev.yaml

@ -15,13 +15,13 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
druid:
# MySql、PostgreSQL校验
# MySql、PostgreSQL、SqlServer校验
validation-query: select 1
# Oracle校验
#validation-query: select 1 from dual
#项目模块集中配置
blade:
#分布式锁配置
@ -49,18 +49,10 @@ blade:
#username: postgres
#password: 123456
# Oracle
#url: jdbc:oracle:thin:@127.0.0.1:49161:orcl
#url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
#username: BLADEX
#password: oracle
document:
resources:
- name: 授权模块
location: /blade-auth
- name: 工作台模块
location: /blade-desk
- name: 系统模块
location: /blade-system
- name: Demo模块
location: /blade-demo
- name: Dubbo模块
location: /blade-dubbo-consumer
#password: BLADEX
# SqlServer
#url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex
#username: bladex
#password: bladex

3
doc/nacos/blade-prod.yaml

@ -17,8 +17,9 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
druid:
# MySql、PostgreSQL校验
# MySql、PostgreSQL、SqlServer校验
validation-query: select 1
# Oracle校验
#validation-query: select 1 from dual

3
doc/nacos/blade-test.yaml

@ -16,8 +16,9 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
druid:
# MySql、PostgreSQL校验
# MySql、PostgreSQL、SqlServer校验
validation-query: select 1
# Oracle校验
#validation-query: select 1 from dual

28
doc/nacos/blade.yaml

@ -23,7 +23,7 @@ spring:
#feign配置
feign:
hystrix:
sentinel:
enabled: true
okhttp:
enabled: true
@ -86,6 +86,22 @@ knife4j:
enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST
language: zh-CN
enableFooter: false
enableFooterCustom: true
footerCustomContent: Copyright © 2021 BladeX All Rights Reserved
#swagger公共信息
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
version: 2.8.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.vip
terms-of-service-url: https://bladex.vip
contact:
name: smallchill
email: smallchill@163.com
url: https://gitee.com/smallc
#blade配置
blade:
@ -93,6 +109,9 @@ blade:
token:
#是否有状态
state: false
#redis序列化方式
redis:
serializer-type: protostuff
#接口配置
api:
#报文加密配置
@ -136,9 +155,14 @@ blade:
#基础认证配置
basic:
- method: ALL
pattern: /dashboard/activities
pattern: /dashboard/info
username: "blade"
password: "blade"
#动态签名认证配置
sign:
- method: ALL
pattern: /dashboard/sign
crypto: "sha1"
#多终端认证配置
client:
- client-id: sword

6
pom.xml

@ -5,11 +5,11 @@
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>2.7.2.RELEASE</version>
<version>2.8.0.RELEASE</version>
<packaging>pom</packaging>
<properties>
<bladex.project.version>2.7.2.RELEASE</bladex.project.version>
<bladex.project.version>2.8.0.RELEASE</bladex.project.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
@ -20,7 +20,7 @@
<dubbo.version>2.7.8</dubbo.version>
<spring.boot.version>2.2.13.RELEASE</spring.boot.version>
<spring.cloud.version>Hoxton.SR9</spring.cloud.version>
<spring.cloud.version>Hoxton.SR10</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>
<!-- 推荐使用Harbor -->

2
script/docker/app/.env

@ -1,2 +1,2 @@
REGISTER=192.168.0.157/blade
TAG=2.7.2.RELEASE
TAG=2.8.0.RELEASE

70
script/docker/app/deploy.sh

@ -1,27 +1,45 @@
#使用说明,用来提示输入参数
usage() {
echo "Usage: sh 执行脚本.sh [port|mount|base|modules|monitor|stop|rm|rmiNoneTag]"
echo "Usage: sh 执行脚本.sh [port|mount|base|monitor|modules|prometheus|alertmanager|stop|rm|rmiNoneTag]"
exit 1
}
#开启所需端口
port(){
#gateway
firewall-cmd --add-port=88/tcp --permanent
#web
firewall-cmd --add-port=8000/tcp --permanent
#nacos
firewall-cmd --add-port=8848/tcp --permanent
#sentinel
firewall-cmd --add-port=8858/tcp --permanent
#grafana
firewall-cmd --add-port=3000/tcp --permanent
#mysql
firewall-cmd --add-port=3306/tcp --permanent
#redis
firewall-cmd --add-port=3379/tcp --permanent
#admin
firewall-cmd --add-port=7002/tcp --permanent
#ureport
firewall-cmd --add-port=7003/tcp --permanent
#zipkin
firewall-cmd --add-port=9411/tcp --permanent
#prometheus
firewall-cmd --add-port=9090/tcp --permanent
#flowdesign
firewall-cmd --add-port=9999/tcp --permanent
#swagger
firewall-cmd --add-port=18000/tcp --permanent
#firewalld
service firewalld restart
}
##放置挂载文件
mount(){
#挂载配置文件
if test ! -f "/docker/nginx/api/nginx.conf" ;then
mkdir -p /docker/nginx/api
cp nginx/api/nginx.conf /docker/nginx/api/nginx.conf
@ -35,6 +53,34 @@ mount(){
mkdir -p /docker/nacos/init.d
cp nacos/init.d/custom.properties /docker/nacos/init.d/custom.properties
fi
if test ! -f "/docker/prometheus/prometheus.yml" ;then
mkdir -p /docker/prometheus
cp prometheus/config/prometheus.yml /docker/prometheus/prometheus.yml
fi
if test ! -f "/docker/prometheus/rules/alert_rules.yml" ;then
mkdir -p /docker/prometheus/rules
cp prometheus/config/alert_rules.yml /docker/prometheus/rules/alert_rules.yml
fi
if test ! -f "/docker/grafana/grafana.ini" ;then
mkdir -p /docker/grafana
cp prometheus/config/grafana.ini /docker/grafana/grafana.ini
fi
if test ! -f "/docker/alertmanager/alertmanager.yml" ;then
mkdir -p /docker/alertmanager
cp prometheus/config/alertmanager.yml /docker/alertmanager/alertmanager.yml
fi
if test ! -f "/docker/alertmanager/templates/wechat.tmpl" ;then
mkdir -p /docker/alertmanager/templates
cp prometheus/config/wechat.tmpl /docker/alertmanager/templates/wechat.tmpl
fi
if test ! -f "/docker/webhook_dingtalk/dingtalk.yml" ;then
mkdir -p /docker/webhook_dingtalk
cp prometheus/config/dingtalk.yml /docker/webhook_dingtalk/dingtalk.yml
fi
#增加目录权限
chmod -R 777 /docker/prometheus
chmod -R 777 /docker/grafana
chmod -R 777 /docker/alertmanager
}
#启动基础模块
@ -49,7 +95,17 @@ monitor(){
#启动程序模块
modules(){
docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-report blade-user blade-desk blade-system blade-log blade-flow blade-flow-design blade-resource
docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-swagger blade-report blade-user blade-desk blade-system blade-log blade-flow blade-flow-design blade-resource
}
#启动普罗米修斯模块
prometheus(){
docker-compose up -d prometheus node-exporter mysqld-exporter cadvisor grafana
}
#启动监听模块
alertmanager(){
docker-compose up -d alertmanager webhook-dingtalk
}
#关闭所有模块
@ -78,11 +134,17 @@ case "$1" in
"base")
base
;;
"monitor")
monitor
;;
"modules")
modules
;;
"monitor")
monitor
"prometheus")
prometheus
;;
"alertmanager")
alertmanager
;;
"stop")
stop

175
script/docker/app/docker-compose.yml

@ -1,5 +1,10 @@
version: '3'
services:
####################################################################################################
###=================================== 以下为中间件模块 =========================================###
####################################################################################################
nacos:
image: nacos/nacos-server:1.3.2
hostname: "nacos-standalone"
@ -84,8 +89,12 @@ services:
networks:
- blade_net
####################################################################################################
###================================= 以下为BladeX服务模块 =======================================###
####################################################################################################
blade-admin:
image: "${REGISTER}/blade/blade-admin:${TAG}"
image: "${REGISTER}/blade-admin:${TAG}"
environment:
- TZ=Asia/Shanghai
ports:
@ -93,10 +102,22 @@ services:
privileged: true
restart: always
networks:
- blade_net
blade_net:
ipv4_address: 172.30.0.72
blade-swagger:
image: "${REGISTER}/blade-swagger:${TAG}"
environment:
- TZ=Asia/Shanghai
ports:
- 18000:18000
privileged: true
restart: always
networks:
- blade_net
blade-turbine:
image: "${REGISTER}/blade/blade-turbine:${TAG}"
image: "${REGISTER}/blade-turbine:${TAG}"
environment:
- TZ=Asia/Shanghai
ports:
@ -107,7 +128,7 @@ services:
- blade_net
blade-gateway1:
image: "${REGISTER}/blade/blade-gateway:${TAG}"
image: "${REGISTER}/blade-gateway:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -117,7 +138,7 @@ services:
ipv4_address: 172.30.0.81
blade-gateway2:
image: "${REGISTER}/blade/blade-gateway:${TAG}"
image: "${REGISTER}/blade-gateway:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -127,7 +148,7 @@ services:
ipv4_address: 172.30.0.82
blade-auth1:
image: "${REGISTER}/blade/blade-auth:${TAG}"
image: "${REGISTER}/blade-auth:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -137,7 +158,7 @@ services:
ipv4_address: 172.30.0.91
blade-auth2:
image: "${REGISTER}/blade/blade-auth:${TAG}"
image: "${REGISTER}/blade-auth:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -147,7 +168,7 @@ services:
ipv4_address: 172.30.0.92
blade-report:
image: "${REGISTER}/blade/blade-report:${TAG}"
image: "${REGISTER}/blade-report:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -157,7 +178,7 @@ services:
ipv4_address: 172.30.0.98
blade-log:
image: "${REGISTER}/blade/blade-log:${TAG}"
image: "${REGISTER}/blade-log:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -166,7 +187,7 @@ services:
- blade_net
blade-desk:
image: "${REGISTER}/blade/blade-desk:${TAG}"
image: "${REGISTER}/blade-desk:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -175,7 +196,7 @@ services:
- blade_net
blade-user:
image: "${REGISTER}/blade/blade-user:${TAG}"
image: "${REGISTER}/blade-user:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -184,7 +205,7 @@ services:
- blade_net
blade-system:
image: "${REGISTER}/blade/blade-system:${TAG}"
image: "${REGISTER}/blade-system:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -193,7 +214,7 @@ services:
- blade_net
blade-flow:
image: "${REGISTER}/blade/blade-flow:${TAG}"
image: "${REGISTER}/blade-flow:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -202,7 +223,7 @@ services:
- blade_net
blade-flow-design:
image: "${REGISTER}/blade/blade-flow-design:${TAG}"
image: "${REGISTER}/blade-flow-design:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -213,7 +234,7 @@ services:
- blade_net
blade-resource:
image: "${REGISTER}/blade/blade-resource:${TAG}"
image: "${REGISTER}/blade-resource:${TAG}"
environment:
- TZ=Asia/Shanghai
privileged: true
@ -221,6 +242,130 @@ services:
networks:
- blade_net
####################################################################################################
###=============================== 以下为Prometheus监控模块 =====================================###
####################################################################################################
prometheus:
image: prom/prometheus:v2.24.1
hostname: "prometheus"
environment:
- TZ=Asia/Shanghai
ports:
- 9090:9090
volumes:
- /docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /docker/prometheus/rules:/etc/prometheus/rules
command: "--config.file=/etc/prometheus/prometheus.yml --web.enable-lifecycle"
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.90
node-exporter:
image: prom/node-exporter:v1.0.1
hostname: "node-exporter"
environment:
- TZ=Asia/Shanghai
ports:
- 9190:9100
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.93
mysqld-exporter:
image: prom/mysqld-exporter:v0.12.1
hostname: "mysqld-exporter"
environment:
- TZ=Asia/Shanghai
# 需要先在mysql服务执行如下语句
# =====================================================================================
# === CREATE USER 'exporter'@'mysql服务ip' IDENTIFIED BY '密码'; ===
# === GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'mysql服务ip'; ===
# === flush privileges; ===
# =====================================================================================
- DATA_SOURCE_NAME=exporter:密码@(mysql服务ip:mysql服务端口)/
ports:
- 9104:9104
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.94
cadvisor:
image: google/cadvisor:v0.33.0
hostname: "cadvisor"
environment:
- TZ=Asia/Shanghai
ports:
- 18080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
command: "detach=true"
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.180
grafana:
image: grafana/grafana:7.3.7
hostname: "grafana"
environment:
- TZ=Asia/Shanghai
- GF_SERVER_ROOT_URL=https://grafana.bladex.vip
- GF_SECURITY_ADMIN_PASSWORD=1qaz@WSX
ports:
- 3000:3000
volumes:
- /docker/grafana/grafana.ini:/etc/grafana/grafana.ini
- /docker/grafana:/var/lib/grafana
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.30
alertmanager:
image: prom/alertmanager:v0.21.0
hostname: "alertmanager"
environment:
- TZ=Asia/Shanghai
ports:
- 9093:9093
volumes:
- /docker/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
- /docker/alertmanager/data:/etc/alertmanager/data
- /docker/alertmanager/templates:/etc/alertmanager/templates
command: "--config.file=/etc/alertmanager/alertmanager.yml --storage.path=/etc/alertmanager/data"
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.99
webhook-dingtalk:
image: timonwong/prometheus-webhook-dingtalk:v1.4.0
hostname: "webhook-dingtalk"
environment:
- TZ=Asia/Shanghai
ports:
- 8060:8060
command: "ding.profile=webhook_robot=https://oapi.dingtalk.com/robot/send?access_token=xxxxx"
privileged: true
restart: always
networks:
blade_net:
ipv4_address: 172.30.0.96
networks:
blade_net:
driver: bridge

4
script/docker/app/nginx/web/nginx.conf

@ -33,7 +33,6 @@ http {
upstream gateway {
server 172.30.0.81;
server 172.30.0.82;
server 172.30.0.83;
}
@ -43,7 +42,8 @@ http {
root /usr/share/nginx/html;
location / {
root html;
index index.html;
}
location ^~ /oauth/redirect {

Loading…
Cancel
Save