From 3ae6f056666cdb139200833e35e206573264dd34 Mon Sep 17 00:00:00 2001 From: Rodrigo Agundez Date: Tue, 25 Nov 2025 23:46:30 +0800 Subject: [PATCH] Create initial startup script to modify uvicorn based on environment variables --- start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 start.sh diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..1cf2543 --- /dev/null +++ b/start.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +HOST="${HOST:-0.0.0.0}" +PORT="${PORT:-8000}" +WORKERS="${UVICORN_WORKERS:-1}" + +if [ "$UVICORN_RELOAD" = "true" ]; then + exec uvicorn app.main:app --host "$HOST" --port "$PORT" --reload +else + exec uvicorn app.main:app --host "$HOST" --port "$PORT" --workers "$WORKERS" +fi