chore(config): Improve Nacos high availability deployment
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
primary: master
|
||||
strict: false
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://5.180.253.115:3306/video_user?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: sty@G458221
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
data:
|
||||
redis:
|
||||
database: 1
|
||||
host: 5.180.253.115
|
||||
port: 6379
|
||||
password: redis_EsJ8FX
|
||||
timeout: 10000
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.nuaa.video: debug
|
||||
org.springframework.security: debug
|
||||
@@ -1,97 +0,0 @@
|
||||
server:
|
||||
port: 9002
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: video-user
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_SERVERS:192.168.1.101:8848,192.168.1.102:8848,192.168.1.103:8848}
|
||||
namespace: ${NACOS_NAMESPACE:public}
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
username: nacos
|
||||
password: nacos
|
||||
ip: ${USER_IP:}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
file-extension: yaml
|
||||
username: nacos
|
||||
password: nacos
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: ${SENTINEL_HOST:sentinel}:${SENTINEL_PORT:8080}
|
||||
port: 8722
|
||||
client-ip: ${USER_IP:}
|
||||
eager: true
|
||||
datasource:
|
||||
url: jdbc:mysql://${MYSQL_HOST:mysql}:${MYSQL_PORT:3306}/video_user?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&allowMultiQueries=true
|
||||
username: root
|
||||
password: ${MYSQL_ROOT_PASSWORD:root123456}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
max-lifetime: 58000
|
||||
idle-timeout: 300000
|
||||
connection-timeout: 20000
|
||||
connection-test-query: SELECT 1
|
||||
keepalive-time: 60000
|
||||
validation-timeout: 3000
|
||||
minimum-idle: 5
|
||||
maximum-pool-size: 20
|
||||
data:
|
||||
redis:
|
||||
password: ${REDIS_PASSWORD:redis_HA_Cluster_2024}
|
||||
database: 1
|
||||
timeout: 10000
|
||||
sentinel:
|
||||
master: mymaster
|
||||
nodes: ${REDIS_SENTINEL_NODES:192.168.1.101:26379,192.168.1.102:26379,192.168.1.103:26379}
|
||||
password: ${REDIS_PASSWORD:redis_HA_Cluster_2024}
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 200
|
||||
max-wait: -1
|
||||
max-idle: 10
|
||||
min-idle: 0
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: com.nuaa.video.user.entity
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: false
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-field: is_deleted
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
auth:
|
||||
ignore-urls:
|
||||
- /user/profile/public/**
|
||||
- /user/profile/init
|
||||
- /actuator/**
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.nuaa.video: info
|
||||
org.springframework.security: info
|
||||
|
||||
minio:
|
||||
endpoint: http://${MINIO_HOST:minio}:${MINIO_PORT:9000}
|
||||
accessKey: minioadmin
|
||||
secretKey: minioadmin123
|
||||
bucketName: video-platform
|
||||
@@ -5,15 +5,17 @@ spring:
|
||||
application:
|
||||
name: video-user
|
||||
profiles:
|
||||
active: dev
|
||||
active: ${SPRING_PROFILES_ACTIVE:dev}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:${spring.application.name}.yaml?username=${NACOS_USERNAME:nacos}&password=${NACOS_PASSWORD:nacos}
|
||||
- optional:nacos:common.yaml?refreshEnabled=true
|
||||
- optional:nacos:common-redis-${spring.profiles.active}.yaml?refreshEnabled=true
|
||||
- optional:nacos:${spring.application.name}.yaml?refreshEnabled=true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:5.180.253.115}:${NACOS_PORT:8848}
|
||||
namespace: ${NACOS_NAMESPACE:public}
|
||||
server-addr: ${NACOS_SERVER_ADDR:${NACOS_HOST:127.0.0.1}:${NACOS_PORT:8848}}
|
||||
namespace: ${NACOS_NAMESPACE:}
|
||||
group: ${NACOS_GROUP:DEFAULT_GROUP}
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:nacos}
|
||||
@@ -25,57 +27,6 @@ spring:
|
||||
file-extension: yaml
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:nacos}
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: ${SENTINEL_DASHBOARD_HOST:5.180.253.115}:${SENTINEL_DASHBOARD_PORT:8080}
|
||||
port: ${SPRING_CLOUD_SENTINEL_TRANSPORT_PORT:8721}
|
||||
client-ip: ${SPRING_CLOUD_SENTINEL_TRANSPORT_CLIENT_IP:}
|
||||
eager: true
|
||||
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${MYSQL_HOST:5.180.253.115}:${MYSQL_PORT:3306}/video_user?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
username: ${MYSQL_USERNAME:root}
|
||||
password: ${MYSQL_PASSWORD:sty@G458221}
|
||||
hikari:
|
||||
minimum-idle: 5
|
||||
maximum-pool-size: 20
|
||||
idle-timeout: 30000
|
||||
max-lifetime: 1200000
|
||||
connection-timeout: 30000
|
||||
connection-test-query: SELECT 1
|
||||
|
||||
data:
|
||||
redis:
|
||||
password: ${REDIS_PASSWORD:redis_EsJ8FX}
|
||||
database: 1
|
||||
timeout: 10000
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 200
|
||||
max-wait: -1
|
||||
max-idle: 10
|
||||
min-idle: 0
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: com.nuaa.video.user.entity
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: false
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
logic-delete-field: is_deleted
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
auth:
|
||||
ignore-urls:
|
||||
- /user/profile/public/**
|
||||
- /user/profile/init
|
||||
- /actuator/**
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
@@ -85,15 +36,3 @@ management:
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.nuaa.video: info
|
||||
org.springframework.security: info
|
||||
|
||||
# MinIO配置
|
||||
minio:
|
||||
endpoint: http://5.180.253.115:9002
|
||||
accessKey: minioadmin
|
||||
secretKey: minioadmin
|
||||
bucketName: video-platform
|
||||
Reference in New Issue
Block a user