diff --git a/Makefile b/Makefile index c1629a8..7210e1c 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,11 @@ start: make build bash ./guardrails_api/start.sh +start-dev: + make install-dev + make build + bash ./guardrails_api/start-dev.sh + infra: docker compose --profile infra up --build diff --git a/guardrails_api/start-dev.sh b/guardrails_api/start-dev.sh new file mode 100755 index 0000000..e5e9fc3 --- /dev/null +++ b/guardrails_api/start-dev.sh @@ -0,0 +1,9 @@ +export APP_ENVIRONMENT=local +export PYTHONUNBUFFERED=1 +export LOGLEVEL="INFO" +export GUARDRAILS_LOG_LEVEL="INFO" +export GUARDRAILS_PROCESS_COUNT=1 +export SELF_ENDPOINT=http://localhost:8000 +export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES + +gunicorn --bind 0.0.0.0:8000 --timeout=5 --threads=10 "guardrails_api.app:create_app()" --reload