fix(api): graceful shutdown, единый обработчик ошибок и корректные 404

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
DenozordecandClaude Sonnet 5.5 committed 2026-10-23 15:53:18 +07:00
1 parent 0948455d15
commit 140ffdb7b1
10 files changed
+335 -9

No files matched your search

+2
View File
@@ -54,6 +54,8 @@ services:
pull_policy: always
container_name: auth-portal
restart: unless-stopped
init: true
stop_grace_period: 15s
depends_on:
- traefik
# No host ports — only Traefik publishes 80/443.
+1
View File
@@ -52,6 +52,7 @@ ENV NODE_ENV=production \
COPY --from=build --chown=node:node /out ./
USER node
EXPOSE 8080
STOPSIGNAL SIGTERM
VOLUME ["/data"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]