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

feat: add docker and nginx support #388

Merged
merged 3 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
doc: add docker support
  • Loading branch information
97k committed Oct 13, 2024
commit a19fdf19a89bc738325029c13150f07c41c62622
5 changes: 4 additions & 1 deletion examples/email-assistant/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Use an official Python runtime as a parent image
# Dockerfile for Email Assistant
# This container sets up a Python environment for running the Email Assistant server
# along with the Burr UI. It exposes ports 7241 and 7242 for the UI and API respectively.

FROM python:3.11-bookworm

# Set the working directory in the container
Expand Down
27 changes: 27 additions & 0 deletions examples/email-assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,30 @@ Note we will be adding two things to this demo:
Open the notebook <a target="_blank" href="https://colab.research.google.com/github/dagworks-inc/burr/blob/main/examples/email-assistant/notebook.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

## Running the UI with Email Server Backend in a Docker Container

We have added Docker support along with a compose file and nginx as a proxy for the API and Burr UI. To run the email assistant app with these new features:

1. Run the following command:
```
docker compose up --build
```

2. This will start the email assistant app along with nginx, which allows you to access:
- BURR UI on `telemetry.localhost`
- API on `api.localhost`

3. If you prefer not to use subdomains powered by nginx, you can also access:
- Email server running Burr: Navigate to `localhost:7242/docs`
- Burr UI: Navigate to `localhost:7241`

4. If you don't have a UI, go to demos and play with the email-assistant. Otherwise, connect to the Burr email server with your UI code.

Note: This setup does not mount a persistent volume, so state is lost once the container goes down.

## Additional Information

We will be adding two things to this demo:
1. An integration with the Burr web app
2. A standalone server example with a walkthrough
Loading