diff --git a/Dockerfile b/Dockerfile index 3ad4b19..9477d4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,5 +20,4 @@ RUN npm run build # entry WORKDIR /usr/src/guppe EXPOSE 443 80 -HEALTHCHECK CMD /usr/bin/curl --fail http://localhost/ || exit 1 CMD [ "node", "index.js" ] diff --git a/docker-compose.yml b/docker-compose.yml index 905ea2c..11b0b0b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,13 +24,21 @@ services: driver: local options: max-size: '10m' + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 30s + + worker1: image: datatitian/guppe command: [ "node", "deliveryWorker.js" ] deploy: mode: replicated - replicas: 8 + replicas: 34 restart: always env_file: '.env' environment: