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"