Nginx Root User and Port issue Fix: ProductivitySuite#1893
Conversation
…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>
There was a problem hiding this comment.
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
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
|
Please fix the CI issue |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
[nitpick] Consider explicitly noting the default host port (80) in the README to avoid confusion for users who may have custom port configurations.
| 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: |
|
@sgurunat , |
|
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. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
… test by updating image URL (#1893) Signed-off-by: Yao, Qing <qing.yao@intel.com>
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.
Dependencies
This PR depends on GenAIComps changes made for nginx. Dependency PR: opea-project/GenAIComps#1636
Tests
Tested all the features of ProductivitySuite