From 24cd73526f626a5c2254fdfb7d576391305c3864 Mon Sep 17 00:00:00 2001 From: brocsam Date: Fri, 28 Feb 2025 21:55:28 +0000 Subject: [PATCH] Add healthchecks to backend services - Add healthcheck to backend service - Add healthcheck to backend-cron service - Configure interval, timeout, retries - Add start_period to healthchecks - Add VSCode settings for keyboard layout --- .vscode/settings.json | 3 +++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ef714c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "keyboard.layout": "de" +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index a95d21d..b174ec1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,12 @@ services: placement: constraints: - node.labels.reskreen-ready==true + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/api/auth/health/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s backend-cron: image: registry.resk-u.ch/clerc/reskreen:latest command: @@ -51,6 +57,12 @@ services: max_attempts: 3 placement: constraints: + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s - node.labels.reskreen-ready==true networks: default: