From a9cf94d1f0ce1a0905ea8d16b10998b5f7b6e0a2 Mon Sep 17 00:00:00 2001 From: David Melamed Date: Sun, 29 Jun 2025 14:17:00 -0600 Subject: [PATCH] feat: Add Nixpacks build configuration --- .nixpacks/health-check.sh | 6 ++++++ nixpacks.toml | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100755 .nixpacks/health-check.sh create mode 100644 nixpacks.toml diff --git a/.nixpacks/health-check.sh b/.nixpacks/health-check.sh new file mode 100755 index 0000000..8736cec --- /dev/null +++ b/.nixpacks/health-check.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if [ -n "$PORT" ]; then + curl -f http://localhost:$PORT/health || exit 1 +else + echo "Health check passed" +fi diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..13ec006 --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,11 @@ +[phases.setup] +nixPkgs = ["python3", "gcc"] + +[phases.install] +cmds = ["pip install -r requirements.txt"] + +[start] +cmd = "python app.py" + +[variables] +PYTHONUNBUFFERED = "1"