Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ ENV VERIFIER_PORT=3001

EXPOSE 3001

# NOTE: 127.0.0.1 not localhost. Alpine's busybox wget resolves
# `localhost` to IPv6 (::1) first; the verifier binds IPv4 0.0.0.0,
# so the IPv6 connection is refused and busybox bails without falling
# back to IPv4. Using the literal IPv4 address sidesteps the resolver.
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3001/health || exit 1
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3001/health || exit 1

CMD ["node", "dist/server.js"]

Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ services:
- VERIFIER_CIRCUIT_VERSION=v1
- LOG_LEVEL=info
restart: unless-stopped
# 127.0.0.1 (not localhost) because alpine busybox wget hits IPv6 first
# and the verifier binds 0.0.0.0 (IPv4 only). The Dockerfile carries
# the same fix; this is belt-and-braces for compose-level overrides.
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3001/health']
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://127.0.0.1:3001/health']
interval: 30s
timeout: 10s
retries: 3
Expand Down
Loading