Merge remote-tracking branch 'origin/main' into feat/crawler-system-chromium
This commit is contained in:
@@ -24,10 +24,12 @@ COPY --from=builder --chown=node:node /app/package.json ./
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
|
||||
# Alpine's busybox `wget` is the canonical lightweight HTTP probe.
|
||||
# `--spider` doesn't follow redirects; `node build` serves a 200 on
|
||||
# `/` for the homepage so this works without a dedicated /health.
|
||||
# Alpine's busybox `wget` is the canonical lightweight HTTP probe. Probe
|
||||
# 127.0.0.1, not `localhost`: musl resolves `localhost` to IPv6 ::1 first,
|
||||
# but the Node server binds IPv4 0.0.0.0 only, so a localhost probe gets
|
||||
# "connection refused" and the container is wrongly marked unhealthy. Use a
|
||||
# GET (`-O /dev/null`) since `node build` serves 200 on `/`.
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget -q --spider http://localhost:3000/ || exit 1
|
||||
CMD wget -q -O /dev/null http://127.0.0.1:3000/ || exit 1
|
||||
|
||||
CMD ["node", "build"]
|
||||
|
||||
Reference in New Issue
Block a user