fix w compose

This commit is contained in:
Mateusz Gruszczyński
2025-10-07 21:24:52 +02:00
parent 81744b5c5e
commit 355b73775f

View File

@@ -7,7 +7,13 @@ services:
expose:
- "${APP_PORT:-8000}"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; import sys; req = urllib.request.Request('http://localhost:${APP_PORT:-8000}/healthcheck', headers={'X-Internal-Check': '${HEALTHCHECK_TOKEN}'}); sys.exit(0) if urllib.request.urlopen(req).read() == b'OK' else sys.exit(1)"]
test:
[
"CMD",
"python",
"-c",
"import urllib.request; import sys; req = urllib.request.Request('http://localhost:${APP_PORT:-8000}/healthcheck', headers={'X-Internal-Check': '${HEALTHCHECK_TOKEN}'}); sys.exit(0) if urllib.request.urlopen(req).read() == b'OK' else sys.exit(1)",
]
interval: 30s
timeout: 10s
retries: 3
@@ -34,13 +40,6 @@ services:
- ./deploy/varnish/default.vcl:/etc/varnish/default.vcl:ro
environment:
- VARNISH_SIZE=256m
healthcheck:
test: [ "CMD-SHELL", "curl -fsS -H 'X-Internal-Check=${HEALTHCHECK_TOKEN}' http://localhost/healthcheck | grep -q OK" ]
interval: 30s
timeout: 5s
retries: 3
env_file:
- .env
networks:
- lista-zakupow_network
restart: unless-stopped