Skip to content

Commit

Permalink
add a make start-dev that will restart app for development convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
dtam committed Jun 25, 2024
1 parent 65efea5 commit c0bf38a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions guardrails_api/start-dev.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c0bf38a

Please sign in to comment.