提交 6e64298b authored 作者: chenshiying's avatar chenshiying

[新增] 配置修改

上级 1f35c414
...@@ -144,3 +144,7 @@ rm -rf /var/jenkins_home/.m2/repository/com/loit/* ...@@ -144,3 +144,7 @@ rm -rf /var/jenkins_home/.m2/repository/com/loit/*
ls -la /var/jenkins_home/.m2/repository/com/loit/ ls -la /var/jenkins_home/.m2/repository/com/loit/
新增服务器nginx 配置 /usr/local/nginx/conf/
新增服务器需要先配置 jenkins ssh(页面配置)
检查 web 和h5 前缀
server:
#端口号
port: 8139
# 启用gzip压缩响应数据
compression:
enabled: true
# 2KB以上的数据都会压缩
min-response-size: 2048
mime-types: application/json,application/xml,text/html,text/plain,text/css,application/x-javascript
# 应用名称
spring:
application:
name: loit-general-config-form
main:
#覆盖之前相同名称的bean
allow-bean-definition-overriding: true
cloud:
# 注册中心地址
nacos:
discovery:
server-addr: 192.168.230.18:80
namespace: 05270cbf-5a81-4a23-a534-b59ba26f11d5
# 限流
sentinel:
datasource:
# Sentinel 流控规则配置
ds:
nacos:
dataId: ${spring.application.name}-sentinel
server-addr: ${spring.cloud.nacos.discovery.server-addr}
namespace: ${spring.cloud.nacos.discovery.namespace}
#数据类型
data-type: json
#所属分组
groupId: DEFAULT_GROUP
# 规则类型 流控
rule-type: flow
# Sentinel 降级规则配置
ds1:
nacos:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
namespace: ${spring.cloud.nacos.discovery.namespace}
dataId: ${spring.application.name}-degrade-rules
#数据类型
data-type: json
#所属分组
groupId: DEFAULT_GROUP
# 规则类型 降级
rule-type: degrade
#mysql 数据源
datasource:
url: jdbc:mysql://10.0.120.198:7063/loit_dform_zhxc?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
type: com.alibaba.druid.pool.DruidDataSource
username: root
password: loit2019ABC
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1
# redis 数据库
redis:
database: 0
jedis:
pool:
max-idle: 20
min-idle: 0
max-active: 8
max-wait: -1
timeout: 10000
password: portal2019
sentinel:
master: mymaster
nodes: 10.0.120.158:26379,10.0.120.210:26379,10.0.120.84:26379
# json框架jackson配置
jackson:
# 设置全局时区
time-zone: "GMT+8"
# mybatis配置
mybatis:
configuration:
map-underscore-to-camel-case: true
typeAliasesPackage: com.loit.sone
mapperLocations: classpath*:mapper/**/*.xml
feign:
client:
config:
default:
connectTimeout: 100000
ReadTimeout: 100000
#开启sentinel 熔断
sentinel:
enabled: true
# jetcache使用
jetcache:
areaInCacheName: false
# 控制台输出统计数据,统计间隔,0表示不统计
statIntervalMinutes: 5
local:
default:
limit: 300
expireAfterWriteInMillis: 100000
# 缓存类型。tair、redis为当前支持的远程缓存;linkedhashmap、caffeine为当前支持的本地缓存类型
type: linkedhashmap
keyConvertor: fastjson
remote:
default:
keyConvertor: fastjson
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
type: redis.lettuce
uri: redis-sentinel://10.0.120.158:26379,10.0.120.210:26379,10.0.120.84:26379?sentinelMasterId=mymaster
readFrom: slavePreferred
loit:
swagger:
basePackage: com.loit.sone
# 单点登录配置
cas:
app:
access_token_cookie_tim_out: 43200
logging:
config: http://${spring.cloud.nacos.discovery.server-addr}/nacos/v1/cs/configs?group=DEFAULT_GROUP&tenant=${spring.cloud.nacos.discovery.namespace}&dataId=logback-logstash.xml
gray:
# 是否启用灰度(默认为false)
enabled: true
server:
# 灰度管控端的url
url: http://loit-gray-server
es:
host: 192.168.225.189
post: 9200
scheme: http
space_index: ledger_inspection_object_zf
search_index: ledger_responsible_subject_zf
#互联网区百度接口调用
baiduAPI:
path: http://120.27.92.213:8181
#勤务报备系统(督察获取勤务报备相关的接口时)
dutyReport:
path: http://39.98.202.173:7069
# 转发
cgsdInspector:
path: http://101.200.184.12:7082
#督查统计(顾世龙)
dutyStatisics:
path: http://101.200.184.12:7082
server:
#端口号
port: 8140
# 启用gzip压缩响应数据
compression:
enabled: true
# 2KB以上的数据都会压缩
min-response-size: 2048
mime-types: application/json,application/xml,text/html,text/plain,text/css,application/x-javascript
# 应用名称
spring:
application:
name: loit-general-config-form
main:
#覆盖之前相同名称的bean
allow-bean-definition-overriding: true
cloud:
# 注册中心地址
nacos:
discovery:
server-addr: 192.168.230.18:80
namespace: 05270cbf-5a81-4a23-a534-b59ba26f11d5
# 限流
sentinel:
datasource:
# Sentinel 流控规则配置
ds:
nacos:
dataId: ${spring.application.name}-sentinel
server-addr: ${spring.cloud.nacos.discovery.server-addr}
namespace: ${spring.cloud.nacos.discovery.namespace}
#数据类型
data-type: json
#所属分组
groupId: DEFAULT_GROUP
# 规则类型 流控
rule-type: flow
# Sentinel 降级规则配置
ds1:
nacos:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
namespace: ${spring.cloud.nacos.discovery.namespace}
dataId: ${spring.application.name}-degrade-rules
#数据类型
data-type: json
#所属分组
groupId: DEFAULT_GROUP
# 规则类型 降级
rule-type: degrade
#mysql 数据源
datasource:
url: jdbc:mysql://10.0.120.198:7063/loit_dform_zhxc?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true
type: com.alibaba.druid.pool.DruidDataSource
username: root
password: loit2019ABC
driver-class-name: com.mysql.cj.jdbc.Driver
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1
# redis 数据库
redis:
database: 0
jedis:
pool:
max-idle: 20
min-idle: 0
max-active: 8
max-wait: -1
timeout: 10000
password: portal2019
sentinel:
master: mymaster
nodes: 10.0.120.158:26379,10.0.120.210:26379,10.0.120.84:26379
# json框架jackson配置
jackson:
# 设置全局时区
time-zone: "GMT+8"
# mybatis配置
mybatis:
configuration:
map-underscore-to-camel-case: true
typeAliasesPackage: com.loit.sone
mapperLocations: classpath*:mapper/**/*.xml
feign:
client:
config:
default:
connectTimeout: 100000
ReadTimeout: 100000
#开启sentinel 熔断
sentinel:
enabled: true
# jetcache使用
jetcache:
areaInCacheName: false
# 控制台输出统计数据,统计间隔,0表示不统计
statIntervalMinutes: 5
local:
default:
limit: 300
expireAfterWriteInMillis: 100000
# 缓存类型。tair、redis为当前支持的远程缓存;linkedhashmap、caffeine为当前支持的本地缓存类型
type: linkedhashmap
keyConvertor: fastjson
remote:
default:
keyConvertor: fastjson
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
type: redis.lettuce
uri: redis-sentinel://10.0.120.158:26379,10.0.120.210:26379,10.0.120.84:26379?sentinelMasterId=mymaster
readFrom: slavePreferred
loit:
swagger:
basePackage: com.loit.sone
# 单点登录配置
cas:
app:
access_token_cookie_tim_out: 43200
logging:
config: http://${spring.cloud.nacos.discovery.server-addr}/nacos/v1/cs/configs?group=DEFAULT_GROUP&tenant=${spring.cloud.nacos.discovery.namespace}&dataId=logback-logstash.xml
gray:
# 是否启用灰度(默认为false)
enabled: true
server:
# 灰度管控端的url
url: http://loit-gray-server
es:
host: 192.168.225.189
post: 9200
scheme: http
space_index: ledger_inspection_object_zf
search_index: ledger_responsible_subject_zf
#互联网区百度接口调用
baiduAPI:
path: http://120.27.92.213:8181
#勤务报备系统(督察获取勤务报备相关的接口时)
dutyReport:
path: http://39.98.202.173:7069
# 转发
cgsdInspector:
path: http://101.200.184.12:7082
#督查统计(顾世龙)
dutyStatisics:
path: http://101.200.184.12:7082
#user nobody;
worker_rlimit_core 200m;
working_directory /tmp;
worker_processes 8;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 60000;
use epoll;
accept_mutex off;
multi_accept on;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/nginx/logs/sone.access.log main;
sendfile on;
tcp_nodelay on;
tcp_nopush on;
client_max_body_size 512m;
client_body_buffer_size 1024k;
client_body_temp_path /tmp;
keepalive_timeout 1800;
#gzip on;
server {
listen 80;
server_name localhost;
location /nginx-status {
stub_status;
access_log off;
#allow 192.168.179.0/24;
deny all;
}
location /hello {
default_type 'text/plain';
return 200 'hello!';
}
}
include /usr/local/nginx/conf/conf.d.start/*.conf;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论