diff --git a/Dockerfile b/Dockerfile index 098a7630f..26b737253 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,7 +80,7 @@ RUN sed -i 's/\r$//' /app/entrypoint.sh && chmod +x /app/entrypoint.sh /app/bin/ EXPOSE 3000 HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ - CMD ["node", "-e", "const p=process.env.PORT||3000;fetch('http://127.0.0.1:'+p+'/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] + CMD wget -q -T 4 -O /dev/null "http://127.0.0.1:${PORT:-3000}/api/v1/health" ENTRYPOINT ["/sbin/tini", "-s", "--"] CMD ["sh", "/app/entrypoint.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index b0eca0b91..a2a5fa51a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,18 +49,6 @@ services: security_opt: - no-new-privileges:true stop_grace_period: 30s - healthcheck: - test: - [ - "CMD", - "node", - "-e", - "const p=process.env.PORT||3000;fetch('http://127.0.0.1:'+p+'/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))", - ] - interval: 30s - timeout: 5s - retries: 3 - start_period: 20s postgres: container_name: bookorbit-db