diff --git a/web/docker-compose.yml b/web/docker-compose.yml index 8b63c42..ce16203 100644 --- a/web/docker-compose.yml +++ b/web/docker-compose.yml @@ -10,10 +10,10 @@ services: - TURTLE_SERVER_URL=${TURTLE_SERVER_URL:-} restart: unless-stopped healthcheck: - test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health',r=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))"] + test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/health"] interval: 10s - timeout: 3s - start_period: 5s + timeout: 5s + start_period: 15s retries: 3 client: diff --git a/web/server/Dockerfile b/web/server/Dockerfile index abb0aaa..c09e76d 100644 --- a/web/server/Dockerfile +++ b/web/server/Dockerfile @@ -26,8 +26,8 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh EXPOSE 3001 -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD node -e "require('http').get('http://localhost:3001/api/health',r=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))" +HEALTHCHECK --interval=10s --timeout=5s --start_period=15s --retries=3 \ + CMD wget -qO- http://localhost:3001/api/health || exit 1 ENTRYPOINT ["docker-entrypoint.sh"] CMD ["node", "server.js"]