fix: use 127.0.0.1 instead of localhost in health checks
All checks were successful
Deploy to Production / deploy (push) Successful in 1m35s
All checks were successful
Deploy to Production / deploy (push) Successful in 1m35s
Alpine's wget resolves localhost to IPv6 [::1] first, but Next.js standalone listens on 0.0.0.0 (IPv4 only), causing connection refused. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
72c502f1bc
commit
070f74d978
@ -54,5 +54,5 @@ jobs:
|
|||||||
docker compose --project-name galaxis-po --env-file .env.prod -f docker-compose.prod.yml ps
|
docker compose --project-name galaxis-po --env-file .env.prod -f docker-compose.prod.yml ps
|
||||||
docker exec galaxis-po-backend python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || { echo "Backend: FAILED"; exit 1; }
|
docker exec galaxis-po-backend python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || { echo "Backend: FAILED"; exit 1; }
|
||||||
echo "Backend: OK"
|
echo "Backend: OK"
|
||||||
docker exec galaxis-po-frontend wget -q --spider http://localhost:3000/ || { echo "Frontend: FAILED"; exit 1; }
|
docker exec galaxis-po-frontend wget -q --spider http://127.0.0.1:3000/ || { echo "Frontend: FAILED"; exit 1; }
|
||||||
echo "Frontend: OK"
|
echo "Frontend: OK"
|
||||||
|
|||||||
@ -43,6 +43,6 @@ ENV HOSTNAME="0.0.0.0"
|
|||||||
|
|
||||||
# Health check
|
# Health check
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/ || exit 1
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user