
一句话承诺:一张图+一个yaml,让服务按健康状态顺序启动,减少“连不上”的尴尬。

version: '3.8'
services:
db:
image: postgres:14
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 10
api:
build: ./api
depends_on:
db:
condition: service_healthy
web:
build: ./web
depends_on:
api:
condition: service_healthyPrometheus 指标与告警:Alertmanager 最小配置(yaml+图)。