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,167 @@
--- #################### 娉ㄥ唽涓績 + 閰嶇疆涓績鐩稿叧閰嶇疆 ####################
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:
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
url-pattern: /druid/*
login-username: ${DRUID_USERNAME:admin}
login-password: ${DRUID_PASSWORD:admin}
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic:
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://${MYSQL_HOST:172.17.16.8}:${MYSQL_PORT:3306}/${MYSQL_DATABASE:aiot-platform-test}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: ${MYSQL_USER:root}
password: ${MYSQL_PASSWORD:}
slave:
lazy: true
url: jdbc:mysql://${MYSQL_SLAVE_HOST:${MYSQL_HOST:172.17.16.8}}:${MYSQL_SLAVE_PORT:${MYSQL_PORT:3306}}/${MYSQL_DATABASE:aiot-platform-test}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: ${MYSQL_SLAVE_USER:${MYSQL_USER:root}}
password: ${MYSQL_SLAVE_PASSWORD:${MYSQL_PASSWORD:}}
tdengine:
url: jdbc:TAOS-RS://${TDENGINE_HOST:172.17.16.7}:${TDENGINE_PORT:6041}/aiot_platform
driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
username: ${TDENGINE_USERNAME:root}
password: ${TDENGINE_PASSWORD:taosdata}
druid:
validation-query: SELECT SERVER_STATUS()
data:
redis:
host: ${REDIS_HOST:172.17.16.7}
port: ${REDIS_PORT:6379}
database: ${REDIS_DATABASE:0}
password: ${REDIS_PASSWORD:}
timeout: 5000ms
lettuce:
pool:
max-active: 8
max-wait: -1ms
max-idle: 8
min-idle: 0
--- #################### MQ 娑堟伅闃熷垪鐩稿叧閰嶇疆 ####################
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锛岄伩鍏嶅惎鍔ㄦ椂杩炴帴澶辫触锛?
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
# RabbitMQ 閰嶇疆锛堝凡绂佺敤鑷姩閰嶇疆锛屼粎淇濈暀閰嶇疆椤逛緵涓氬姟浠g爜浣跨敤锛?
# rabbitmq:
# host: ${RABBITMQ_HOST:127.0.0.1}
# port: ${RABBITMQ_PORT:5672}
# username: ${RABBITMQ_USERNAME:guest}
# password: ${RABBITMQ_PASSWORD:guest}
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:
acquire-timeout: 3000
expire: 30000
--- #################### 鐩戞帶鐩稿叧閰嶇疆 ####################
management:
endpoints:
web:
base-path: /actuator
exposure:
include: '*'
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}
com.viewsh.module.iot.dal.mysql: debug
com.viewsh.module.iot.dal.mysql.sms.SmsChannelMapper: INFO
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
file:
name: ${LOG_FILE_PATH:/app/logs}/${spring.application.name}.log
--- #################### 鑺嬮亾鐩稿叧閰嶇疆 ####################
viewsh:
demo: false
env:
tag: ${HOSTNAME:stage}
captcha:
enable: true
security:
mock-enable: false