From 006281f06245ea7aeb21fdefc504345b33b3447c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Tue, 1 Sep 2026 11:45:38 -0300 Subject: [PATCH] fix: run API as container primary process --- Dockerfile.api | 2 +- server/src/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile.api b/Dockerfile.api index 8594211..3898930 100644 --- a/Dockerfile.api +++ b/Dockerfile.api @@ -10,4 +10,4 @@ COPY constants.ts types.ts ./ ENV APP_ENV=production EXPOSE 3001 -CMD ["sh", "-c", "npm run db:migrate && npm run db:bootstrap-admin && npm run start:api"] +CMD ["sh", "-c", "npm run db:migrate && npm run db:bootstrap-admin && exec ./node_modules/.bin/tsx server/src/index.ts"] diff --git a/server/src/index.ts b/server/src/index.ts index 7a48b5c..cf6245a 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -16,6 +16,7 @@ async function start() { for (const signal of ['SIGINT', 'SIGTERM']) { process.once(signal, () => { + app.log.info({ signal }, 'Shutdown signal received'); app.close() .then(closePool) .finally(() => process.exit(0));