feat: 添加所有核心服务的生产环境配置文件
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled

- 创建 application-prod.yaml 支持环境变量占位符
- 支持 Docker Compose 环境变量注入
- 支持 Nacos 配置中心覆盖
- 涵盖 5 个核心服务: gateway, system, infra, iot-server, iot-gateway
This commit is contained in:
lzh
2026-01-13 11:52:27 +08:00
parent ceea293412
commit 2b9c1aa7d8
5 changed files with 584 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
username: ${NACOS_USERNAME:}
password: ${NACOS_PASSWORD:}
discovery:
namespace: ${NACOS_NAMESPACE:}
group: ${NACOS_GROUP:DEFAULT_GROUP}
metadata:
version: 1.0.0
config:
namespace: ${NACOS_NAMESPACE:}
group: ${NACOS_GROUP:DEFAULT_GROUP}
--- #################### Redis 配置 ####################
spring:
data:
redis:
host: ${REDIS_HOST:127.0.0.1}
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
--- #################### 服务保障相关配置 ####################
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}
file:
name: ${LOG_FILE_PATH:/app/logs}/${spring.application.name}.log
--- #################### 芋道相关配置 ####################
viewsh:
demo: false
env:
tag: ${HOSTNAME:prod}
security:
mock-enable: false