Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploying.md #1239

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/concepts/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ For example, when we Dockerize the Guardrails API for internal use, our final li
```Dockerfile
CMD gunicorn --bind 0.0.0.0:8000 --timeout=90 --workers=4 'guardrails_api.app:create_app(None, "config.py")'
```
Or using uvicorn, we first create a wrapper:

```python
# app_wrapper.py
from guardrails_api.app import create_app

app = create_app(None, "config.py")
```

And then we invoke the wrapper:

```bash
CMD uvicorn app_wrapper:app --host 0.0.0.0 --port 8000
```

This line starts the Guardrails API Flask application with a gunicorn WSGI server. It specifies what port to bind the server to, as well as the timeout for workers and the maximum number of worker threads for handling requests.

Expand Down Expand Up @@ -130,4 +144,4 @@ For example, you should define your Guards in the `config.py` that is loaded ont

Go ahead and deploy your dockerized Guardrails server on any cloud! We have guides on how to deploy Guardrails on specific clouds.

- [Deploying Guardrails on AWS](https://www.guardrailsai.com/docs/how_to_guides/deploying_aws)
- [Deploying Guardrails on AWS](https://www.guardrailsai.com/docs/how_to_guides/deploying_aws)