only healthcheck the webserver, update default worker replicas
This commit is contained in:
parent
3b34244403
commit
725346186b
2 changed files with 9 additions and 2 deletions
|
@ -20,5 +20,4 @@ RUN npm run build
|
||||||
# entry
|
# entry
|
||||||
WORKDIR /usr/src/guppe
|
WORKDIR /usr/src/guppe
|
||||||
EXPOSE 443 80
|
EXPOSE 443 80
|
||||||
HEALTHCHECK CMD /usr/bin/curl --fail http://localhost/ || exit 1
|
|
||||||
CMD [ "node", "index.js" ]
|
CMD [ "node", "index.js" ]
|
||||||
|
|
|
@ -24,13 +24,21 @@ services:
|
||||||
driver: local
|
driver: local
|
||||||
options:
|
options:
|
||||||
max-size: '10m'
|
max-size: '10m'
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||||
|
interval: 1m30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
worker1:
|
worker1:
|
||||||
image: datatitian/guppe
|
image: datatitian/guppe
|
||||||
command: [ "node", "deliveryWorker.js" ]
|
command: [ "node", "deliveryWorker.js" ]
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 8
|
replicas: 34
|
||||||
restart: always
|
restart: always
|
||||||
env_file: '.env'
|
env_file: '.env'
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue