fix: use node fetch for HEALTHCHECK (no wget in node:22-slim)
This commit is contained in:
1 parent
ba50fe729d
commit
850a5242c1
1 file changed
+3
-2
+3
-2
@@ -14,7 +14,8 @@ RUN mkdir -p /app/generated-images
|
|||||||
|
|
||||||
EXPOSE 8935
|
EXPOSE 8935
|
||||||
|
|
||||||
HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
|
# HEALTHCHECK: use node itself (no curl/wget in node:22-slim)
|
||||||
CMD wget -qO- http://127.0.0.1:8935/health || exit 1
|
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"]
|
CMD ["node", "server.mjs"]
|
||||||
Reference in new issue
Block a user