File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ COPY --chown=root:root . .
3737RUN npm install -D webpack-cli && npm run dist
3838
3939# =======================================================
40- FROM nginx:1.26.1-alpine AS production
40+ FROM registry.access.redhat.com/ubi9/nginx-122 AS production
4141# =======================================================
4242# Add application sources to a directory that the assemble script expects them
4343# and set permissions so that the container runs without root access
@@ -48,8 +48,11 @@ RUN chgrp -R 0 /usr/share/nginx/html && \
4848
4949COPY --from=staticbuilder /app/dist /usr/share/nginx/html
5050
51- USER 1001
51+ COPY nginx.conf /opt/app-root/etc/nginx.default.d/default.conf
5252
53- COPY nginx.conf /etc/nginx/conf.d/default.conf
53+ USER 1001
5454
5555EXPOSE 8080
56+
57+ # Run script uses standard ways to run the application
58+ CMD ["/bin/bash" , "-c" , "nginx -g \" daemon off;\" " ]
Original file line number Diff line number Diff line change 1- server {
2- listen 8080 ;
3- server_name localhost;
1+ location /healthz {
2+ return 200 ;
43
5- location /healthz {
6- return 200 ;
7-
8- access_log off;
9- }
4+ access_log off;
5+ }
106
11- location /readiness {
12- return 200 ;
7+ location /readiness {
8+ return 200 ;
139
14- access_log off;
15- }
10+ access_log off;
11+ }
1612
17- location / {
18- root /usr/share/nginx/html;
19- try_files $uri /index .html;
20- }
13+ location / {
14+ root /usr/share/nginx/html;
15+ try_files $uri /index .html;
16+ }
2117
22- error_page 500 502 503 504 /50x .html;
23- location = /50x .html {
24- root /usr/share/nginx/html;
25- }
18+ error_page 500 502 503 504 /50x .html;
19+ location = /50x .html {
20+ root /usr/share/nginx/html;
2621}
You can’t perform that action at this time.
0 commit comments