Merge update#79
Conversation
…/embedder_service
Feat/pdf embedder service
Feat/nginx service
docs: add nginx container name
There was a problem hiding this comment.
Summary of Changes
Hello @NotYuSheng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request primarily focuses on enhancing the deployment architecture by introducing an Nginx reverse proxy. This change centralizes external access to the various microservices, improves routing, and removes direct port exposures, leading to a more robust and manageable setup. Additionally, it includes minor code cleanups and a dependency version adjustment.
Highlights
- Nginx Integration: Introduced an Nginx reverse proxy to centralize access and routing for the microservices, including new Dockerfile, configuration template, and environment examples.
- Service Configuration & Exposure: Updated
chat_service,pdf_extraction_service, andpdf_processor_serviceFastAPI applications to useroot_pathfor proper routing behind the Nginx proxy. Correspondingly, direct host port mappings for these services were removed fromdocker-compose.yml. - Dependency Management: Downgraded the
chromadbimage version from1.0.14to1.0.13indocker-compose.yml. - Code Clean-up & Refinement: Removed commented-out code and simplified error messages in the
embedder_servicefiles for improved readability and less verbose error details.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces an Nginx reverse proxy to act as a single entry point for the various microservices, which is a great architectural improvement. The services are correctly configured to work behind the proxy. The changes also include some good security hardening by preventing detailed exception messages from being exposed to clients.
I've found a critical issue in the Nginx Dockerfile that will prevent the image from building, and a high-priority concern regarding a dependency downgrade that needs clarification. Please see the detailed comments.
For future pull requests, it would be very helpful to provide a more descriptive title and a summary of changes in the description. This helps reviewers understand the context and intent of the changes more quickly.
The review was conducted following the OmniPDF Python Style Guide, which primarily references PEP 8. The changes were also checked against the custom rules for comment priority and naming conventions. No style violations were found in the submitted code changes.
| @@ -0,0 +1,5 @@ | |||
| FROM nginx:1.29.0-alpine | |||
There was a problem hiding this comment.
The Docker image nginx:1.29.0-alpine does not exist on Docker Hub, which will cause the docker-compose build command to fail. The latest mainline version of Nginx is 1.27.0 and the latest stable version is 1.26.1.
Please use a valid and existing image tag to ensure the build is successful.
FROM nginx:1.27.0-alpine
| chromadb: | ||
| container_name: chromadb | ||
| image: chromadb/chroma:1.0.14 | ||
| image: chromadb/chroma:1.0.13 |
There was a problem hiding this comment.
The chromadb/chroma image is being downgraded from 1.0.14 to 1.0.13. While this might be intentional to work around an issue in the newer version, downgrading dependencies can reintroduce previously fixed bugs or security vulnerabilities.
Could you please provide some context for this change? If this downgrade is necessary, it would be good to add a comment in the docker-compose.yml file explaining the reason.
No description provided.