feat: add CI unit test, /api/health, Dockerfile HEALTHCHECK, bundle-analyzer

This commit is contained in:
SpecialX
2026-07-07 20:23:03 +08:00
parent 415dde9122
commit dbb124bf17
7 changed files with 244 additions and 14 deletions

View File

@@ -18,4 +18,7 @@ EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD node -e "fetch('http://localhost:' + (process.env.PORT || 3000) + '/api/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
CMD ["node", "server.js"]