feat: add haproxy load balancer, api replicas and graceful shutdown

This commit is contained in:
2026-11-01 14:50:16 +03:00
parent cdcff89d25
commit e9bc51288b
8 changed files with 103 additions and 8 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ COPY contracts/openapi.json ./contracts/openapi.json
USER node
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://127.0.0.1:8080/health/live',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))"
HEALTHCHECK --interval=5s --timeout=2s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://127.0.0.1:8080/health/ready',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))"
CMD ["node", "dist/main.js"]