File tree Expand file tree Collapse file tree 3 files changed +14
-17
lines changed Expand file tree Collapse file tree 3 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,12 @@ COPY /frontend ./
99RUN npm run build-prod
1010RUN npm run build:wc
1111
12- FROM nginx:alpine
12+ FROM nginxinc/nginx-unprivileged:alpine
13+ USER 101
14+
15+
1316COPY --from=build /app/frontend/dist/ /usr/share/nginx/html/ui/example-content/ui/
1417COPY --from=build /app/frontend/dist-wc/ /usr/share/nginx/html/ui/example-content/wc/
15- COPY nginx.conf /etc/nginx/nginx.conf
18+ COPY nginx.conf /etc/nginx/conf.d/default.conf
19+
1620EXPOSE 8080
Original file line number Diff line number Diff line change 44 "scripts" : {
55 "ng" : " ng" ,
66 "start" : " ng serve ui" ,
7- "start:wc" : " ng serve wc --single-bundle --no-live-reload --port=4201" ,
7+ "start:wc" : " ng serve wc --single-bundle --no-live-reload --port=4201 --serve-path=/ui/example-ui/wc/ " ,
88 "build" : " ng build ui" ,
99 "build:wc" : " ng build wc --single-bundle --output-hashing none" ,
1010 "build-prod" : " ng build ui -c production" ,
Original file line number Diff line number Diff line change 1- # the events block is required
2- events {}
3-
4- http {
5- # include the default mime.types to map file extensions to MIME types
1+ server {
62 include /etc/nginx/mime.types ;
3+ add_header Access-Control-Allow-Origin *;
74
8- server {
9- add_header Access-Control-Allow-Origin *;
10-
11- listen 8080 ;
5+ listen 8080 ;
126
13- root /usr/share/nginx/html;
7+ root /usr/share/nginx/html;
148
15- location /ui/example-content/ui/ {
16- try_files $uri $uri / /ui/example-content/ui/index .html =404 ;
17- }
9+ location /ui/example-content/ui/ {
10+ try_files $uri $uri / /ui/example-content/ui/index .html =404 ;
1811 }
19- }
12+ }
You can’t perform that action at this time.
0 commit comments