diff --git a/Dockerfile b/Dockerfile index 5145f8e..d56b558 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ EXPOSE 3000 # Health check HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD node -e "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })" || exit 1 + CMD node -e "require('http').get('http://127.0.0.1:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })" || exit 1 # Start the application with startup script CMD ["/app/start.sh"] diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index f87a1ba..4e147a5 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -16,8 +16,9 @@ services: - "3000:3000" volumes: - storage-data:/app/.storage + # localhost kann auf [::1] zeigen, die App lauscht aber nur auf IPv4 (0.0.0.0) → 127.0.0.1 healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/health"] interval: 30s timeout: 10s retries: 3 diff --git a/docker-compose.yml b/docker-compose.yml index efa8928..153dcfc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: volumes: - ./.storage:/app/.storage healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"] + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/"] interval: 30s timeout: 10s retries: 3