HH-442: isolate runtime processes and harden shutdown (#90)

* HH-442: isolate runtime processes and harden shutdown

* HH-442: harden worker shutdown races

* HH-442: gate dependency shutdown on active handlers

---------

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-22 02:38:15 +08:00
committed by GitHub
co-authored by rogee
parent 6d6d80dd86
commit 798ea43c2f
35 changed files with 1673 additions and 451 deletions
+6 -2
View File
@@ -77,6 +77,7 @@ services:
gochat:
image: *gochat-image
restart: always
stop_grace_period: ${GOCHAT_STOP_GRACE_PERIOD:-35s}
depends_on:
postgres:
condition: service_healthy
@@ -90,7 +91,7 @@ services:
volumes:
- gochat_storage:/app/storage
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/health"]
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/ready"]
interval: 10s
timeout: 5s
start_period: 15s
@@ -107,14 +108,17 @@ services:
worker:
image: *gochat-image
restart: always
stop_grace_period: ${GOCHAT_STOP_GRACE_PERIOD:-35s}
depends_on:
gochat:
condition: service_healthy
postgres:
condition: service_healthy
redis:
condition: service_healthy
meilisearch:
condition: service_healthy
command: ["serve", "--worker-only"]
command: ["worker"]
environment:
<<: *gochat-environment
GOCHAT_DATABASE_RUN_MIGRATIONS: "false"