refactor(api): TOML 配置 SSOT、统一错误契约、Auth/事务加固与可观测性 (#33)

配置 SSOT(TOML + .env)
统一错误契约
Auth 与事务边界
Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client
可观测性(OpenTelemetry + LGTM)
This commit is contained in:
Sully
2026-05-22 13:44:50 +08:00
committed by GitHub
parent f09ae248f9
commit 53e0065e3e
298 changed files with 15247 additions and 4344 deletions

View File

@@ -31,12 +31,20 @@ services:
container_name: life-echo-redis-dev
ports:
- "48307:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
volumes:
- redis_data_dev:/data
command: redis-server --appendonly yes
command: >
sh -c 'exec redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
$${REDIS_PASSWORD:+--requirepass "$$REDIS_PASSWORD"}'
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
test:
[
"CMD-SHELL",
'if [ -n "$$REDIS_PASSWORD" ]; then redis-cli -a "$$REDIS_PASSWORD" ping | grep -q PONG; else redis-cli ping | grep -q PONG; fi',
]
interval: 10s
timeout: 5s
retries: 5