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