feat: add Docker container healthcheck (#493)

This commit was merged in pull request #493.
This commit is contained in:
ZacharyZcR
2026-01-12 15:29:02 +08:00
committed by GitHub
parent 81d506afba
commit f5d948aa45

View File

@@ -74,6 +74,9 @@ VOLUME ["/app/data"]
EXPOSE ${PORT} 30001 30002 30003 30004 30005 30006
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD node -e "require('http').get('http://localhost:30001/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh