From 1534cecb93d1f078483ad19d7faa17e0e59b72c6 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Thu, 13 Aug 2026 23:09:00 +0700 Subject: [PATCH 1/2] fix(queen): drop the duplicate npm ci that Nixpacks cannot delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The queen has never deployed. Every one of the 13 deployments on this service failed, and the last three failed here: npm error EBUSY: resource busy or locked, rmdir '/app/node_modules/.cache' exit code: 240 Nixpacks mounts a build cache at /app/node_modules/.cache and already runs `npm ci` in its own install phase. Our buildCommand ran `npm ci` a second time, and `npm ci` deletes node_modules wholesale before installing -- it cannot rmdir the mounted cache, so it aborts. Verified locally against this exact tree: `npm ci` installs 73 packages and `npm run build` emits 83 modules / 253 kB, both exit 0. The application was never the problem. Note for whoever changes this next: this file OVERRIDES the service settings set through the API or dashboard. Setting buildCommand on the service instance had no effect while this line said otherwise -- the build kept using the value from here. Королева не деплоилась ни разу: все 13 деплоев упали. Nixpacks монтирует кэш в /app/node_modules/.cache и сам выполняет npm ci; наша команда сборки запускала npm ci повторно, а он сносит node_modules целиком и не может удалить примонтированный каталог. Локально та же версия собирается чисто. Co-Authored-By: Claude Opus 5 --- apps/queen-web/railway.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/queen-web/railway.json b/apps/queen-web/railway.json index 90040c707d..e110e856f6 100644 --- a/apps/queen-web/railway.json +++ b/apps/queen-web/railway.json @@ -2,7 +2,7 @@ "$schema": "https://railway.com/railway.schema.json", "build": { "builder": "NIXPACKS", - "buildCommand": "npm ci && npm run build" + "buildCommand": "npm run build" }, "deploy": { "startCommand": "npm start", From 6edc64840263b715c2a8ea915ad66665e5f22169 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Thu, 13 Aug 2026 23:19:51 +0700 Subject: [PATCH 2/2] fix(queen): let Nixpacks serve the built site, not `vite preview` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build now succeeds; the deploy failed at the healthcheck with "1/1 replicas never became healthy". The container starts and listens: > vite preview --host 0.0.0.0 --port ${PORT:-8080} ➜ Local: http://localhost:8080/ so the process is alive and the probe still cannot reach it. `vite preview` is a development preview server: Vite 6 rejects requests whose Host header it does not recognise, which is exactly what a platform healthcheck sends. Vite's own documentation says it is not meant to serve production traffic. Nixpacks had already detected a static build and provisioned Caddy for it: ║ caddy │ pkgs: caddy, cmds: caddy fmt --overwrite /assets/Caddyfile ║ Our startCommand overrode that. Dropping it hands the built `dist` back to Caddy, which is what the generated plan intended. Сборка проходит, падал healthcheck. vite preview — это dev-сервер: Vite 6 отклоняет запросы с незнакомым Host, а именно такой шлёт проверка платформы. Nixpacks уже поднял Caddy для статики, но наш startCommand его перебивал. Co-Authored-By: Claude Opus 5 --- apps/queen-web/railway.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/queen-web/railway.json b/apps/queen-web/railway.json index e110e856f6..e6ff8c2766 100644 --- a/apps/queen-web/railway.json +++ b/apps/queen-web/railway.json @@ -5,7 +5,6 @@ "buildCommand": "npm run build" }, "deploy": { - "startCommand": "npm start", "healthcheckPath": "/", "healthcheckTimeout": 30, "restartPolicyType": "ON_FAILURE",