refactor(config): 统一版本管理,移除冗余的 app_version 字段

- 移除 config/*.toml 中的 app_version 字段(代码中未使用)
- 版本号统一由 Cargo.toml 管理
- Cargo.lock 自动同步更新
- 更新 AGENTS.md 添加版本管理说明
This commit is contained in:
2026-04-19 20:35:12 +08:00
parent db7fa8e460
commit a91948a18c
5 changed files with 47 additions and 1 deletions

11
config/default.toml Normal file
View File

@@ -0,0 +1,11 @@
database_url = "postgres://milkydata:password@localhost:5432/milkydata_dev"
wechat_appid = "wx_test_appid"
wechat_secret = "test_secret"
jwt_secret = "dev-only-secret-change-in-production"
ssl_key_path = ""
ssl_cert_path = ""
rust_log = "debug"
environment = "development"
free_user_data_limit = 100
server_host = "0.0.0.0"
server_ports = [8080, 3000, 8000, 8888]

11
config/development.toml Normal file
View File

@@ -0,0 +1,11 @@
database_url = "postgres://milkydata:44n6FdB8CdDAk5rk@127.0.0.1:5432/milkydata_dev"
wechat_appid = "wx5b00eb90621802f7"
wechat_secret = "494efc513faa310bfba588bda2849bfd"
jwt_secret = "dev-only-secret-change-in-production"
ssl_key_path = ""
ssl_cert_path = ""
rust_log = "debug"
environment = "development"
free_user_data_limit = 100
server_host = "0.0.0.0"
server_ports = [8080, 3000, 8000, 8888]

11
config/production.toml Normal file
View File

@@ -0,0 +1,11 @@
database_url = "postgres://milkydata:44n6FdB8CdDAk5rk@154.37.213.24:5432/milkydata"
wechat_appid = "wx5b00eb90621802f7"
wechat_secret = "494efc513faa310bfba588bda2849bfd"
jwt_secret = "your_super_secret_key"
ssl_key_path = "/etc/ssl/private/private.key"
ssl_cert_path = "/etc/ssl/certs/full_chain.pem"
rust_log = "info"
environment = "production"
free_user_data_limit = 20
server_host = "0.0.0.0"
server_ports = [4433, 8443, 8080, 3000, 8000, 8888]