Files
cmautobuy/admin/config.example.yaml
T

64 lines
2.6 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.
# Admin 本机配置模板
#
# 用法:把本文件复制成 admin/config.yaml,填入真实账号密码。
#
# Windows: copy admin\config.example.yaml admin\config.yaml
# Linux: cp admin/config.example.yaml admin/config.yaml
#
# `[必须]` config.yaml 已在 .gitignore 里,绝不能提交进 Git——
# 密码一旦进了 git 历史就很难清干净。
# `[必须]` 打包发给别人时也不要带上 config.yaml。
#
# MySQL 配置见 docs/admin/00-getting-started.md §6;
# 顺运宝接口细节见 docs/admin/08-顺运宝接口.md。
database:
# MySQL 8 地址。本机 MySQL 或 SSH 隧道都写 127.0.0.1。数据库客户端需要
# 公网直连时,必须先按 admin/AGENTS.md 配置固定 IP 白名单和强制 SSL;
# 绝不能把 3307 向所有公网来源开放。
host: 127.0.0.1
# 本机 MySQL 默认可写 3307;连接线上 MySQL 的 SSH 隧道可改成 13307。
# 端口加引号,明确按字符串读取。
port: "3307"
name: autobuy
user: buy
# 本机/SSH 隧道使用 disabled。公网直连必须使用 verify_ca,加载服务器公开 CA,
# 强制 TLS 1.2+ 并验证证书链,连接失败时不会退回明文。
tls_mode: disabled
tls_ca: certs/mysql84-ca.pem
# `[必须]` 数据库密码也是明文配置,必须加引号;config.yaml 只能留在
# 运行机器上,不得提交、打包、截图或粘贴到工单和日志。
password: "你的 MySQL 密码"
syb:
# 顺运宝 ERP 地址。一般不用改,域名变了才改。
base_url: https://www.shunyunbaoerp.com
username: 你的顺运宝账号
# `[必须]` 密码要加引号。纯数字密码不加引号会被 YAML 解析成整数,
# 反序列化到 string 字段会直接报错,前导 0 也会丢。
password: "你的密码"
# 列表接口每页条数。抓包里网页用的就是 20。
page_size: 20
# 整个日期范围的货运单数上限,默认 10000;超过就停止,不拉列表和明细。
# 页面每次最多同步 31 个自然日。
max_matches: 10000
# 兼容旧版自动增量入口的首次起始日期;新版页面默认最近 3 天,不使用此值。
sync_from: "2026-07-01"
# 验证码自动识别服务地址(工单 #47)。留空 = 只用手工输入弹窗,不报错。
# `[必须]` 验证码图片会被发送到这个地址,见 docs/admin/08-顺运宝接口.md
# 「验证码自动识别」一节——换成别人的服务前先重新评估这一点。
ocr_url: https://ocr.ilapage.cn/ocr
# 自动识别失败后的重试次数上限,默认 5。
ocr_max_attempts: 5