From 33414afde2a521ad722e262d8f48f9eff73bce38 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sat, 24 Apr 2021 19:44:55 +0200 Subject: [PATCH] Use native NodeJS healthcheck --- compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose.yml b/compose.yml index 2094a64..115bb8b 100644 --- a/compose.yml +++ b/compose.yml @@ -7,11 +7,11 @@ services: networks: - proxy healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8000"] - interval: 10s + test: "nodejs -e \"http.get('http://localhost:8000', (res) => { console.log('status: ', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });\"" + interval: 30s timeout: 10s - retries: 10 - start_period: 15s + retries: 3 + start_period: 1m deploy: update_config: failure_action: rollback