feat(P3): Docker健康检查 + Worker优雅重启 + 前端错误监控

This commit is contained in:
Sisyphus
2026-04-25 16:07:58 +08:00
parent 025be6dd78
commit 3613cfe5a3
5 changed files with 468 additions and 404 deletions

View File

@@ -71,6 +71,11 @@ services:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- --post-data='{}' --header='Content-Type: application/json' http://localhost:8080/account/findByID || exit 1"]
interval: 10s
timeout: 5s
retries: 3
worker:
build:
@@ -87,6 +92,11 @@ services:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pgrep worker || exit 1"]
interval: 15s
timeout: 5s
retries: 3
frontend:
build:
@@ -97,6 +107,11 @@ services:
- "5173:80"
depends_on:
- backend
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:80/ || exit 1"]
interval: 10s
timeout: 5s
retries: 3
volumes:
mysql_data: