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));