fix(deploy): follow PORT in every probe, wait for a slow boot, and probe the database

Changing PORT left the Dockerfile and compose healthchecks, the chart's
containerPort, Service target and probes on 3000, so the container went
unhealthy and Kubernetes restarted it in a loop. All of them follow PORT
now. The chart gains a startup probe (ten minutes for a first boot, a
long migration or a restore at boot, which liveness used to kill after
about 105 s), a readiness probe on the new /api/health/ready that asks
the database, extraEnv and extraEnvFrom for the settings the chart does
not list, slots for the four secrets it had none for, and the
DEFAULT_LANGUAGE and MCP_MAX_SESSION_PER_USER values it documented but
never set. The Dockerfile no longer hides a failed npm ci behind a ';',
pins gosu, and the language lists name all 27 locales.
This commit is contained in:
Maurice
2026-10-07 16:40:17 +02:00
parent 8c3fad5e82
commit a869269591
13 changed files with 172 additions and 25 deletions
+2 -2
View File
@@ -348,7 +348,7 @@ export function applyGlobalMiddleware(
if (shouldForceHttps) {
app.use((req: Request, res: Response, next: NextFunction) => {
if (req.path === '/api/health') return next();
if (req.path === '/api/health' || req.path === '/api/health/ready') return next();
if (req.secure || req.headers['x-forwarded-proto'] === 'https') return next();
res.redirect(301, 'https://' + (configuredHost ?? req.headers.host) + req.url);
});
@@ -358,7 +358,7 @@ export function applyGlobalMiddleware(
// Request logging with sensitive field redaction (SENSITIVE_KEYS/redact above)
app.use((req: Request, res: Response, next: NextFunction) => {
if (req.path === '/api/health') return next();
if (req.path === '/api/health' || req.path === '/api/health/ready') return next();
const startedAt = Date.now();
res.on('finish', () => {
const ms = Date.now() - startedAt;