Fix: Change localhost to 127.0.0.1 in backend healthchecks to bypass Node IPv6 resolution issue with 0.0.0.0 bind
This commit is contained in:
1 parent
d492adb1ff
commit
68c176f972
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -15,6 +15,6 @@ EXPOSE 3001
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:3001/api/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
|
||||
CMD node -e "require('http').get('http://127.0.0.1:3001/api/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
@@ -10,6 +10,6 @@ COPY backend/ .
|
||||
EXPOSE 3001
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
|
||||
CMD bun -e "require('http').get('http://localhost:3001/api/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
|
||||
CMD bun -e "require('http').get('http://127.0.0.1:3001/api/health', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
|
||||
|
||||
CMD ["bun", "run", "server.js"]
|
||||
Reference in new issue
Block a user