-
Notifications
You must be signed in to change notification settings - Fork 74
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
Conversation
api.localhost will direct to api on port 7242 and telemetry.localhost will open the Burr UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 54a7735 in 22 seconds
More details
- Looked at
144
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. examples/email-assistant/Dockerfile:9
- Draft comment:
Consider adding a.dockerignore
file to exclude unnecessary files from the Docker build context, which can speed up the build process and reduce the image size. - Reason this comment was not posted:
Confidence changes required:50%
The Dockerfile is missing a COPY command for the requirements.txt file before the RUN pip install command. This can lead to caching issues during the build process.
2. examples/email-assistant/docker-compose.yaml:25
- Draft comment:
Consider removing thename
field undernetworks
to avoid potential conflicts with network names when running multiple instances. - Reason this comment was not posted:
Confidence changes required:50%
The docker-compose file is using a fixed network name which might cause conflicts if multiple instances are run. It's better to let Docker Compose handle network naming.
3. examples/email-assistant/nginx.conf:7
- Draft comment:
Ensure that your local DNS or hosts file is configured to resolvetelemetry.localhost
andapi.localhost
to the correct IP address. - Reason this comment was not posted:
Confidence changes required:33%
The nginx configuration is set to listen on port 80 for both servers. This is correct as per the PR description, which mentions api.localhost and telemetry.localhost. However, ensure that the DNS or hosts file is configured to resolve these domains correctly.
4. examples/email-assistant/server.py:189
- Draft comment:
Ensure that movingapp.include_router
outside theif __name__ == "__main__":
block is intentional and does not affect other parts of the application. - Reason this comment was not posted:
Confidence changes required:33%
Theapp.include_router
line was moved outside theif __name__ == "__main__":
block, which is correct. However, ensure that this change is intentional and does not affect other parts of the application.
Workflow ID: wflow_nPGAsQMLNy1n3EVW
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look great. Everything works. We just need to add to the README on how to run this (maybe even also put this as a comment in the docker file itself).
E.g. to run the UI, along with the email server backed, in a docker container:
docker build . -t email_assistant
docker run -it -p 7241:7241 -p 7242:7242 -e OPENAI_API_KEY='...' email-assistant
- Navigate to localhost:7242/docs for the email server running burr
- Navigate to localhost:7241 for the Burr UI
- Go to demos and play with the email-assistant if you don't have a UI. Else connect to the burr email server with your UI code.
Notes: this does not mount a persistent volume, so state is lost once the container goes down.
Any other caveats?
@skrawcz Yes, I will add a Readme file and yes there's no persistance. And with compose file we can
|
@skrawcz Let me know if any changes are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Short description explaining the high-level reason for the pull request]
api.localhost will direct to api on port 7242 and telemetry.localhost will open the Burr UI
Changes
How I tested this
Tested the docker build
Notes
Checklist
Important
Adds Docker and Nginx support for email assistant with proxy configuration and minor server updates.
Dockerfile
to set up a Python environment and runwrapper.sh
.docker-compose.yaml
to define services for the app and Nginx, exposing ports 7241 and 7242.nginx.conf
to proxyapi.localhost
to port 7242 andtelemetry.localhost
to port 7241.server.py
to return a welcome message./email_assistant
inserver.py
._run_through()
inserver.py
.wrapper.sh
to start Burr UI and FastAPI server.This description was created by for 54a7735. It will automatically update as commits are pushed.