Skip to content

Nginx Root User and Port issue Fix: ProductivitySuite#1893

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

Nginx Root User and Port issue Fix: ProductivitySuite#1893
sgurunat wants to merge 6 commits into
opea-project:mainfrom
sgurunat:opea-issue-fix

Conversation

@sgurunat

Copy link
Copy Markdown
Contributor

Description

This change is related to below mentioned issues on root user and nginx port. I have updated GenAIComps nginx which is a dependency for this PR.
Have updated ProductivitySuite to use nginx server to route to different services. Updated relevant docker compose file and readme. Removed env.sh file which needed root user. For ProductivitySuite all the routings will happen via nginx server.

Issues

This change is related to below issues:
#517
#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.)

Dependencies

This PR depends on GenAIComps changes made for nginx. Dependency PR: opea-project/GenAIComps#1636

Tests

Tested all the features of ProductivitySuite

…nginx harcoded port issue will be fixed. Removed env.sh in UI which needs root user, also used nginx-unprivileged image which uses non root user. Updated docker compose file and readme accordingly

Signed-off-by: Gurunath S <gurunath.s@intel.com>
Copilot AI review requested due to automatic review settings April 29, 2025 08:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issues related to running ProductivitySuite as root and port conflicts by updating the nginx configuration and routing setup.

  • Updated docker compose file to include a new nginx service (productivity-suite-nginx-server) with relevant environment variables and dependency settings.
  • Modified the README to reflect the new nginx routing and remove outdated environment variable definitions.

Reviewed Changes

Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.

File Description
ProductivitySuite/docker_compose/intel/cpu/xeon/compose.yaml Added a new nginx service configuration and updated environment variables for better service routing.
ProductivitySuite/docker_compose/intel/cpu/xeon/README.md Updated documentation to explain the new nginx routing and removed references to deprecated environment variables.
Files not reviewed (5)
  • ProductivitySuite/docker_compose/intel/cpu/xeon/set_env.sh: Language not supported
  • ProductivitySuite/ui/docker/Dockerfile.react: Language not supported
  • ProductivitySuite/ui/react/.env.production: Language not supported
  • ProductivitySuite/ui/react/env.sh: Language not supported
  • ProductivitySuite/ui/react/package.json: Language not supported

@github-actions

github-actions Bot commented Apr 29, 2025

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@xiguiw

xiguiw commented Apr 30, 2025

Copy link
Copy Markdown
Collaborator

@sgurunat

Please fix the CI issue

mongo Pulling

[523](https://github.com/opea-project/GenAIExamples/actions/runs/14726304719/job/41329674634?pr=1893#step:6:524) productivity-suite-nginx-server Error manifest for opea/nginx:ci not found: manifest unknown: manifest unknown

[524](https://github.com/opea-project/GenAIExamples/actions/runs/14726304719/job/41329674634?pr=1893#step:6:525) mongo Error context canceled

[525](https://github.com/opea-project/GenAIExamples/actions/runs/14726304719/job/41329674634?pr=1893#step:6:526) redis-vector-db Error context canceled

[526](https://github.com/opea-project/GenAIExamples/actions/runs/14726304719/job/41329674634?pr=1893#step:6:527) keycloak Error context canceled

[527](https://github.com/opea-project/GenAIExamples/actions/runs/14726304719/job/41329674634?pr=1893#step:6:528)Error response from daemon: manifest for opea/nginx:ci not found: manifest unknown: manifest unknown

@yinghu5 yinghu5 requested review from ashahba, Copilot, xiguiw and yinghu5 May 13, 2025 07:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes issues related to running ProductivitySuite with root user privileges and improper port configuration by removing the env.sh file and introducing an nginx server for routing. Key changes include:

  • Adding a new environment variable (KC_HTTP_RELATIVE_PATH) for keycloak configuration.
  • Introducing a new service (productivity-suite-nginx-server) in the docker-compose file to route requests to different backend services.
  • Updating the README to reflect the new routing mechanism via nginx rather than directly exposing the previous ports.

Reviewed Changes

Copilot reviewed 2 out of 7 changed files in this pull request and generated 1 comment.

File Description
ProductivitySuite/docker_compose/intel/cpu/xeon/compose.yaml Added keycloak environment variable and a new nginx service configuration.
ProductivitySuite/docker_compose/intel/cpu/xeon/README.md Updated instructions to reference nginx routing instead of a fixed port.
Files not reviewed (5)
  • ProductivitySuite/docker_compose/intel/cpu/xeon/set_env.sh: Language not supported
  • ProductivitySuite/ui/docker/Dockerfile.react: Language not supported
  • ProductivitySuite/ui/react/.env.production: Language not supported
  • ProductivitySuite/ui/react/env.sh: Language not supported
  • ProductivitySuite/ui/react/package.json: Language not supported
Comments suppressed due to low confidence (1)

ProductivitySuite/docker_compose/intel/cpu/xeon/compose.yaml:264

  • Confirm that the value and trailing slash in 'KC_HTTP_RELATIVE_PATH=/keycloak/' align with the downstream keycloak configuration requirements.
- KC_HTTP_RELATIVE_PATH=/keycloak/

## 🚀 Launch the UI

To access the frontend, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
To access the frontend, open the following URL in your browser: http://{host_ip}. By default, the UI runs on port 80 internally. Nginx server will route the calls to appropriate services based on the routes. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:

Copilot AI May 13, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider explicitly noting the default host port (80) in the README to avoid confusion for users who may have custom port configurations.

Suggested change
To access the frontend, open the following URL in your browser: http://{host_ip}. By default, the UI runs on port 80 internally. Nginx server will route the calls to appropriate services based on the routes. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
To access the frontend, open the following URL in your browser: http://{host_ip}. By default, the UI runs on port 80 internally, and the host port is also set to 80 unless otherwise configured. Nginx server will route the calls to appropriate services based on the routes. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:

Copilot uses AI. Check for mistakes.
@yinghu5

yinghu5 commented Jun 11, 2025

Copy link
Copy Markdown
Collaborator

@sgurunat ,
please help to address one CI failed, thank you!

@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.

letonghan pushed a commit that referenced this pull request Sep 17, 2025
… test by updating image URL (#1893)

Signed-off-by: Yao, Qing <qing.yao@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants