fix(docker): слушать IPv6 в nginx — healthcheck на localhost уводил контейнер в unhealthy

This commit is contained in:
kewldan
2026-07-13 02:43:21 +03:00
parent c920330fa6
commit ce4ce046ba
2 changed files with 7 additions and 1 deletions

View File

@@ -22,7 +22,9 @@ services:
# Внутри контейнера nginx слушает на порту 80
- '${CABINET_PORT:-3020}:80'
healthcheck:
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:80/']
# 127.0.0.1 вместо localhost: localhost может резолвиться в [::1], и на
# образах, где nginx слушает только IPv4, healthcheck ложно падает
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://127.0.0.1:80/']
interval: 30s
timeout: 3s
retries: 3