Skip to content

Update nginx conf template#1636

Closed
sgurunat wants to merge 23 commits into
opea-project:mainfrom
sgurunat:opea-issue-fix
Closed

Update nginx conf template#1636
sgurunat wants to merge 23 commits into
opea-project:mainfrom
sgurunat:opea-issue-fix

Conversation

@sgurunat

Copy link
Copy Markdown
Contributor

Description

This change is basically on nginx.conf.template and other files inside nginx folder in regarding to the issue mentioned below on non root user and parameterization of nginx port.
Have added routes for codegen, docsum, chathistory, prompt and keycloak in nginx and used this nginx server in GenAIExamples for Codegen, Docsum and ProductivitySuite.

Issues

This change is related to issue tickets mentioned below.
opea-project/GenAIExamples#517
opea-project/GenAIExamples#503

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Tests

Tested the changes with ProductivitySuite and it works fine

@yinghu5

yinghu5 commented May 16, 2025

Copy link
Copy Markdown
Collaborator

Hi @sgurunat
thank you a lot for the PR. only left two CI , please help to check.

@yinghu5

yinghu5 commented May 23, 2025

Copy link
Copy Markdown
Collaborator

Hi @sgurunat only left one CI of ChatQnA seems failed on dataprep-redis-server health check
image

@yinghu5 yinghu5 requested review from ZePan110 and chensuyue May 23, 2025 08:50
@xiguiw

xiguiw commented May 30, 2025

Copy link
Copy Markdown
Collaborator

@sgurunat
Please help to check the CI failure issue.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using NGINX for forwarding, the BACKEND_SERVICE_NAME, BACKEND_SERVICE_IP, and BACKEND_SERVICE_PORT in the template correspond to the back_end of each example. These values are dynamically assigned through docker_compose.yaml, so there's no need to set the variables separately for each example. For details, refer to: https://github.com/opea-project/GenAIExamples/blob/main/ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml#L175.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WenjiaoYue - This is needed for ProductivitySuite. Because in ProductivitySuite all the solutions will be in one single thing. If we use common variables it will not work.

@WenjiaoYue WenjiaoYue Jun 3, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgurunat Got it. Initially, we assumed your PR was to fix pr_503. If it's specifically for ProductivitySuite, we recommend creating a separate nginx.conf rather than modifying the Nginx template, which is intended for general use across all examples.

  1. Since your nginx.conf is specific to this example, we suggest placing it under ProductivitySuite/docker_image_build.

  2. I also noticed there's already a PR related to Nginx changes in GenAIExamples, but it seems to be missing the Nginx image build step. You can refer to this line in ChatQnA as a reference, and make sure the Dockerfile points to the nginx.conf you placed in ProductivitySuite/docker_image_build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@xiguiw

xiguiw commented Jun 3, 2025

Copy link
Copy Markdown
Collaborator

@sgurunat

This issue is: nginx port should not be 80, it should be configurable.
opea-project/GenAIExamples#503

https://github.com/opea-project/GenAIExamples/blob/09a3196324b6b9094852c9a990d2a9346f779cda/CodeGen/docker/ui/react/nginx.conf#L2

nginx template is a template. You can create different instances based on this template. But not to add every instance into the template.

It's just a template in GenAI components, cannot be changed.

COPY comps/third_parties/nginx/deployment/docker_compose/start-nginx-productivitysuite.sh /usr/local/bin/start-nginx.sh
RUN chmod +x /usr/local/bin/start-nginx.sh

CMD ["/usr/local/bin/start-nginx.sh"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is CI failure.
Does this pass your local test?

FYR,

ENTRYPOINT ["bash", "entrypoint.sh"]

@CICD-at-OPEA

Copy link
Copy Markdown
Collaborator

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@CICD-at-OPEA

Copy link
Copy Markdown
Collaborator

This PR was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A0 need to scrub Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants