From 2e08b6e66ab61c656f27b88d5faef5582887f3d0 Mon Sep 17 00:00:00 2001 From: Tim Bendt Date: Thu, 9 Apr 2026 09:44:56 -0400 Subject: [PATCH] Add health check to ensure Docker Swarm stops old containers after new one is healthy --- nixpacks.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixpacks.toml b/nixpacks.toml index 76d694f..ca53346 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -3,3 +3,9 @@ cmds = ["npm run build"] [start] cmd = "npx serve dist -l 80 -s" + +[healthcheck] +cmd = "curl -f http://localhost:80/ || exit 1" +interval = "10s" +timeout = "5s" +retries = 3