Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit f1ef53a

Browse files
authored
Revert "Support parametrization of nginx port (opea-project#1456)" (opea-project#1473)
This reverts commit eb35fb8.
1 parent 7e8d45e commit f1ef53a

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

comps/third_parties/nginx/deployment/docker_compose/start-nginx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
#!/bin/sh
5-
envsubst '${NGINX_PORT} ${FRONTEND_SERVICE_IP} ${FRONTEND_SERVICE_PORT} ${BACKEND_SERVICE_NAME} ${BACKEND_SERVICE_IP} ${BACKEND_SERVICE_PORT} ${DATAPREP_SERVICE_IP} ${DATAPREP_SERVICE_PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/conf.d/default.conf
5+
envsubst '${FRONTEND_SERVICE_IP} ${FRONTEND_SERVICE_PORT} ${BACKEND_SERVICE_NAME} ${BACKEND_SERVICE_IP} ${BACKEND_SERVICE_PORT} ${DATAPREP_SERVICE_IP} ${DATAPREP_SERVICE_PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/conf.d/default.conf
66
nginx -g 'daemon off;'

comps/third_parties/nginx/src/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44

5-
FROM nginxinc/nginx-unprivileged
6-
USER root
7-
RUN apt-get update && apt-get install -y gettext && apt-get clean
8-
#RUN apk add --no-cache gettext
5+
FROM nginx:alpine
6+
7+
RUN apk add --no-cache gettext
98

109
COPY comps/third_parties/nginx/src/nginx.conf.template /etc/nginx/nginx.conf.template
1110

12-
ENV NGINX_PORT=8080
1311
ENV FRONTEND_SERVICE_IP=localhost
1412
ENV FRONTEND_SERVICE_PORT=5173
1513
ENV BACKEND_SERVICE_NAME=chatqna

comps/third_parties/nginx/src/nginx.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
server {
6-
listen ${NGINX_PORT};
7-
listen [::]:${NGINX_PORT};
6+
listen 80;
7+
listen [::]:80;
88

99
location /home {
1010
alias /usr/share/nginx/html/index.html;

tests/third_parties/test_third_parties_nginx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function start_service() {
2323
export NGINX_PORT=80
2424

2525
# Start Docker Containers
26-
docker run -d --name test-comps-nginx-server -p ${NGINX_PORT}:8080 -e NGINX_PORT=8080 opea/nginx:comps
26+
docker run -d --name test-comps-nginx-server -p 80:80 opea/nginx:comps
2727

2828
sleep 5s
2929
}

0 commit comments

Comments
 (0)