fix: use node fetch for HEALTHCHECK (no wget in node:22-slim)

This commit is contained in:
hermes committed 2026-07-09 17:54:57 +02:00
1 parent ba50fe729d
commit 850a5242c1
1 file changed
+3 -2
+3 -2
View File
@@ -14,7 +14,8 @@ RUN mkdir -p /app/generated-images
EXPOSE 8935
HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
CMD wget -qO- http://127.0.0.1:8935/health || exit 1
# HEALTHCHECK: use node itself (no curl/wget in node:22-slim)
HEALTHCHECK --interval=15s --timeout=5s --retries=3 --start-period=10s \
CMD node -e "fetch('http://127.0.0.1:8935/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
CMD ["node", "server.mjs"]