Name: bj_power_mes Host: 0.0.0.0 Port: 8888 Timeout: 10000 # 请求体上限:go-zero 默认仅 1MB,会拦住照片/PDF 上传;取各文件类型上限的最大值(50MB) MaxBytes: 52428800 # PostgreSQL(独立库 bj_power_mes) Database: Host: 127.0.0.1 Port: 5432 User: postgres Password: postgres Dbname: bj_power_mes MaxIdle: 10 MaxOpen: 20 # Redis(看板缓存 + 防击穿) Redis: Host: 127.0.0.1:6379 Type: node # JWT(统一密钥 Hardman_2026,access 短有效 + refresh 滑动续签) Auth: AccessSecret: Hardman_2026 AccessExpire: 3600 # 项目间内部 API 鉴权(X-API-TOKEN) Internal: Token: Hardman_2026 # 命令行敏感操作门禁密码(migrate/reset-all/seed/change-password 需输入,独立于后台登录账号密码) Cli: AdminPassword: "Hardman_2026" # 日志:按天存储 logs/bj_power_mes-2026-xx-xx.log,保留 30 天 Logger: Level: INFO Format: text Filename: logs/bj_power_mes.log Daily: true MaxSize: 100 MaxBackups: 10 MaxAge: 30 Compress: false Console: true # WMS 内部接口(半成品流转等) Wms: BaseURL: http://127.0.0.1:8890 Token: Hardman_2026 # PLC 对接(mock 模式时 Enable=false,写入工序码 + 读完成信号) Plc: Enable: false Host: 127.0.0.1 Port: 102 # 附件统一存储(与 WMS 共用同一根目录,落盘 年/月/日/文件类型/uuid.ext,库内只存相对路径) # 生产环境改 Dir: /data/bj_power/attachments Upload: Dir: "D:/hardman/bj_power/attachments" MaxMB: 20 # 默认单文件上限 20MB MaxSize: PROCESS_PDF: 52428800 # 工艺流程作业指导书 50MB INSPECTION_PHOTO: 20971520 # 检验/巡检照片 20MB INSPECTION_PDF: 52428800 # 检验报告 50MB DRAWING: 52428800 # 图纸 50MB EXCEL_IMPORT: 10485760 # Excel 导入 10MB LocalRetentionYears: 1 # 本地保留最近 1 年 DiskWarnPercent: 20 # 剩余空间 <20% 告警 DiskCriticalPercent: 10 # 剩余空间 <10% 提示清理/归档 DiskCheckHour: 7 # 每天 07:00 检测 ArchiveDir: "" # 外部备份目录(NAS/移动硬盘),留空则归档仅标记