build(ci): add stage deployment pipeline and configs

This commit is contained in:
lzh
2026-03-30 22:53:46 +08:00
parent 19cb25b0ea
commit 90fa54dc11
8 changed files with 978 additions and 10 deletions

View File

@@ -0,0 +1,217 @@
--- #################### 娉ㄥ唽涓績 + 閰嶇疆涓績鐩稿叧閰嶇疆 ####################
spring:
cloud:
nacos:
server-addr: ${NACOS_ADDR:172.17.16.7:8848}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
discovery:
namespace: ${NACOS_DISCOVERY_NAMESPACE:stage}
group: DEFAULT_GROUP
metadata:
version: 1.0.0
config:
namespace: ${NACOS_CONFIG_NAMESPACE:stage}
group: DEFAULT_GROUP
file-extension: yaml
refresh-enabled: true
--- #################### 鏁版嵁搴撶浉鍏抽厤缃?####################
spring:
datasource:
druid: # Druid 銆愮洃鎺с€戠浉鍏崇殑鍏ㄥ眬閰嶇疆
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂?
url-pattern: /druid/*
login-username: ${DRUID_USERNAME:admin}
login-password: ${DRUID_PASSWORD:admin}
filter:
stat:
enabled: true
log-slow-sql: true # 鎱?SQL 璁板綍
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 澶氭暟鎹簮閰嶇疆
druid: # Druid 銆愯繛鎺ユ睜銆戠浉鍏崇殑鍏ㄥ眬閰嶇疆
initial-size: 5
min-idle: 10
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 600000
max-evictable-idle-time-millis: 1800000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
primary: master
datasource:
master:
url: jdbc:mysql://172.17.16.8:3306/aiot-platform-test?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: root
slave: # 浠庡簱閰嶇疆锛堝彲閫夛級
lazy: true
url: jdbc:mysql://172.17.16.8:3306/aiot-platform-test?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: root
# Redis 閰嶇疆
data:
redis:
host: 172.17.16.7
port: 6379
database: 0
password: ""
timeout: 5000ms
lettuce:
pool:
max-active: 8
max-wait: -1ms
max-idle: 8
min-idle: 0
--- #################### MQ 娑堟伅闃熷垪鐩稿叧閰嶇疆 ####################
# rocketmq 閰嶇疆椤?
rocketmq:
name-server: ${ROCKETMQ_NAMESRV_ADDR:124.222.218.198:9876}
producer:
group: ${spring.application.name}_PRODUCER
access-key: ${ROCKETMQ_ACCESS_KEY:}
secret-key: ${ROCKETMQ_SECRET_KEY:}
consumer:
access-key: ${ROCKETMQ_ACCESS_KEY:}
secret-key: ${ROCKETMQ_SECRET_KEY:}
spring:
# RabbitMQ 閰嶇疆椤癸紙鍙€夛級
rabbitmq:
host: ${RABBITMQ_HOST:127.0.0.1}
port: ${RABBITMQ_PORT:5672}
username: ${RABBITMQ_USERNAME:guest}
password: ${RABBITMQ_PASSWORD:guest}
# Kafka 閰嶇疆椤癸紙鍙€夛級
kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:127.0.0.1:9092}
--- #################### 瀹氭椂浠诲姟鐩稿叧閰嶇疆 ####################
xxl:
job:
enabled: false
admin:
addresses: ${XXL_JOB_ADMIN_ADDRESSES:http://172.17.16.7:19090/xxl-job-admin}
executor:
ip: ${XXL_JOB_EXECUTOR_IP:}
port: ${XXL_JOB_EXECUTOR_PORT:9999}
--- #################### 鏈嶅姟淇濋殰鐩稿叧閰嶇疆 ####################
# Lock4j 閰嶇疆椤?
lock4j:
acquire-timeout: 3000
expire: 30000
--- #################### 鐩戞帶鐩稿叧閰嶇疆 ####################
# Actuator 鐩戞帶绔偣鐨勯厤缃」
management:
endpoints:
web:
base-path: /actuator
exposure:
include: '*'
# Spring Boot Admin 閰嶇疆椤?
spring:
boot:
admin:
client:
instance:
service-host-type: IP
username: ${SPRING_BOOT_ADMIN_USERNAME:admin}
password: ${SPRING_BOOT_ADMIN_PASSWORD:admin}
# 鏃ュ織鏂囦欢閰嶇疆
logging:
level:
root: INFO
com.viewsh: ${LOG_LEVEL:INFO}
file:
name: ${LOG_FILE_PATH:/app/logs}/${spring.application.name}.log
--- #################### 寰俊鍏紬鍙枫€佸皬绋嬪簭鐩稿叧閰嶇疆 ####################
wx:
mp: # 鍏紬鍙烽厤缃紙蹇呭~锛?
app-id: ${WX_MP_APP_ID:wx5b23ba7a5589ecbb} # 浼樺厛鐜鍙橀噺锛屽厹搴曢粯璁ゅ€?
secret: ${WX_MP_SECRET:2a7b3b20c537e52e74afd395eb85f61f}
config-storage:
type: RedisTemplate
key-prefix: wx
http-client-type: HttpClient
miniapp: # 灏忕▼搴忛厤缃紙蹇呭~锛?
appid: ${WX_MINIAPP_APPID:wxc4598c446f8a9cb3}
secret: ${WX_MINIAPP_SECRET:4a1a04e07f6a4a0751b39c3064a92c8b}
config-storage:
type: RedisTemplate
key-prefix: wa
http-client-type: HttpClient
--- #################### 鑺嬮亾鐩稿叧閰嶇疆 ####################
viewsh:
demo: false # 鐢熶骇鐜鍏抽棴婕旂ず妯″紡
env:
tag: ${HOSTNAME:stage}
captcha:
enable: true # 鐢熶骇鐜寮€鍚獙璇佺爜
security:
mock-enable: false # 鐢熶骇鐜鍏抽棴 mock
access-log:
enable: true
wxa-code:
env-version: release
wxa-subscribe-message:
miniprogram-state: formal
justauth:
enabled: false
type:
DINGTALK: # 閽夐拤
client-id: dingvrnreaje3yqvzhxg
client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
ignore-check-redirect-uri: true
WECHAT_ENTERPRISE: # 浼佷笟寰俊
client-id: wwd411c69a39ad2e54
client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
agent-id: 1000004
ignore-check-redirect-uri: true
# noinspection SpringBootApplicationYaml
WECHAT_MINI_PROGRAM: # 寰俊灏忕▼搴?
client-id: ${wx.miniapp.appid}
client-secret: ${wx.miniapp.secret}
ignore-check-redirect-uri: true
ignore-check-state: true # 寰俊灏忕▼搴忥紝涓嶄細浣跨敤鍒?state锛屾墍浠ヤ笉杩涜鏍¢獙
WECHAT_MP: # 寰俊鍏紬鍙?
client-id: ${wx.mp.app-id}
client-secret: ${wx.mp.secret}
ignore-check-redirect-uri: true
ALIPAY: # 鏀粯瀹濆皬绋嬪簭
client-id: xx
client-secret: xx
alipay-public-key: xx
ignore-check-redirect-uri: true
ignore-check-state: true
cache:
type: REDIS
prefix: 'social_auth_state:' # 缂撳瓨鍓嶇紑锛岀洰鍓嶅彧瀵?Redis 缂撳瓨鐢熸晥锛岄粯璁?JUSTAUTH::STATE::
timeout: 24h # 瓒呮椂鏃堕暱锛岀洰鍓嶅彧瀵?Redis 缂撳瓨鐢熸晥锛岄粯璁?3 鍒嗛挓