Files
tyapi-server/configs/env.production.yaml
2025-07-28 14:04:11 +08:00

107 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🏭 生产环境配置
# 只包含与默认配置不同的配置项
# ===========================================
# 🌍 环境标识
# ===========================================
app:
env: production
# ===========================================
# 🌐 服务器配置
# ===========================================
server:
mode: release
# ===========================================
# 🗄️ 数据库配置
# ===========================================
# 敏感信息通过外部环境变量注入
database:
host: "tyapi-postgres-prod"
port: "5432"
user: "tyapi_user"
password: "Pg9mX4kL8nW2rT5y"
name: "tyapi"
sslmode: "disable"
timezone: "Asia/Shanghai"
max_open_conns: 25
max_idle_conns: 10
conn_max_lifetime: 300s
auto_migrate: true
redis:
host: "tyapi-redis-prod"
port: "6379"
password: ""
db: 0
# ===========================================
# 📝 日志配置
# ===========================================
logger:
level: warn
format: json
output: "file"
log_dir: "logs" # 使用相对路径与Dockerfile中的目录一致
max_size: 100
max_backups: 5
max_age: 30
compress: true
use_daily: true
# ===========================================
# 🔐 JWT配置
# ===========================================
# JWT_SECRET 必须通过外部环境变量注入
# ===========================================
# 🔐 JWT配置
# ===========================================
jwt:
secret: JwT8xR4mN9vP2sL7kH3oB6yC1zA5uF0qE9tW
# ===========================================
# 📁 存储服务配置 - 七牛云
# ===========================================
storage:
access_key: "AO6u6sDWi6L9TsPfr4awC7FYP85JTjt3bodZACCM"
secret_key: "2fjxweGtSAEaUdVgDkWEmN7JbBxHBQDv1cLORb9_"
bucket: "tianyuanapi"
domain: "https://file.tianyuanapi.com"
# ===========================================
# 🔍 OCR服务配置 - 百度智能云
# ===========================================
ocr:
api_key: "aMsrBNGUJxgcgqdm3SEdcumm"
secret_key: "sWlv2h2AWA3aAt5bjXCkE6WeA5AzpAAD"
# ===========================================
# 📝 e签宝服务配置
# ===========================================
esign:
app_id: "your_app_id_here"
app_secret: "your_app_secret_here"
server_url: "https://smlt.esign.cn"
template_id: "your_template_id_here"
contract:
name: "企业认证服务协议"
expire_days: 7
retry_count: 3
auth:
org_auth_modes: ["PSN_MOBILE3"]
default_auth_mode: "PSN_MOBILE3"
psn_auth_modes: ["PSN_MOBILE3", "PSN_IDCARD"]
willingness_auth_modes: ["CODE_SMS"]
sign:
auto_finish: true
sign_field_style: 1
client_type: "ALL"
notify:
types: "1"
redirect_url: "https://www.tianyuanapi.com/certification/complete"
# ===========================================
# 🌐 域名配置
# ===========================================
domain:
api: "api.tianyuancha.com" # 生产环境API域名