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