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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user