From 9c4f7762816e540da70b1aaed326d296cba96787 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 11 Dec 2019 16:51:45 +0100 Subject: [PATCH] Disabled back restart, added back healthcheck --- Dockerfile | 3 +++ back/process.yml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65c2aa0b1..13200caa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,3 +34,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