diff --git a/CI/e2e/docker-compose.e2e.yaml b/CI/e2e/docker-compose.e2e.yaml index c80cfd218..88bc220b4 100644 --- a/CI/e2e/docker-compose.e2e.yaml +++ b/CI/e2e/docker-compose.e2e.yaml @@ -48,7 +48,7 @@ services: build: context: . ports: - - 4200:80 + - 4200:8080 volumes: - "./CI/e2e/frontend.config.e2e.json:/usr/share/nginx/html/assets/config.json" depends_on: diff --git a/Dockerfile b/Dockerfile index 5fd4c5dc7..3f0a03cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,10 @@ RUN npm ci COPY . /frontend/ RUN npx ng build -FROM nginx:1.25-alpine +FROM nginxinc/nginx-unprivileged +USER root RUN rm -rf /usr/share/nginx/html/* -COPY --from=builder /frontend/dist/ /usr/share/nginx/html/ COPY scripts/nginx.conf /etc/nginx/nginx.conf -EXPOSE 80 +USER 101 +COPY --from=builder /frontend/dist/ /usr/share/nginx/html/ +EXPOSE 8080 diff --git a/scripts/nginx.conf b/scripts/nginx.conf index 525bde35c..fdac68dc6 100644 --- a/scripts/nginx.conf +++ b/scripts/nginx.conf @@ -5,7 +5,7 @@ user nginx; worker_processes auto; error_log /var/log/nginx/error.log; -pid /run/nginx.pid; +pid /tmp/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; @@ -31,8 +31,8 @@ http { default_type application/octet-stream; server { - listen 80 default_server; - listen [::]:80 default_server; + listen 8080 default_server; + listen [::]:8080 default_server; server_name _; root /usr/share/nginx/html;