From 1b32c13c7f6be3f11ae0ff07ffc9cf59cbbc3796 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 11 Dec 2019 16:30:45 +0100 Subject: [PATCH] Disabled back restart, added back healthcheck --- Dockerfile | 4 +++- back/process.yml | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65c2aa0b1..f2cbeeff9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ nodejs \ && apt-get purge -y --auto-remove \ - curl \ gnupg2 \ && rm -rf /var/lib/apt/lists/* \ && npm -g install pm2 @@ -34,3 +33,6 @@ COPY \ ./ CMD ["pm2-runtime", "./back/process.yml"] + +HEALTHCHECK --interval=1m --timeout=10s \ + CMD curl -f http://localhost:3000/api/Applications/status || exit 1 diff --git a/back/process.yml b/back/process.yml index edf66a8c1..3062091b4 100644 --- a/back/process.yml +++ b/back/process.yml @@ -1,6 +1,5 @@ apps: - script: ./loopback/server/server.js name: salix-back - cron_restart: '0 4 * * *' instances: 1 - max_restarts: 10 + max_restarts: 5