From 725346186bbcda8228e8fc4071ce8dc6f7ad2c94 Mon Sep 17 00:00:00 2001 From: Will Murphy Date: Mon, 7 Nov 2022 21:47:40 -0600 Subject: [PATCH] only healthcheck the webserver, update default worker replicas --- Dockerfile | 1 - docker-compose.yml | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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: