File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 99
1010
1111if [ -n " $APP_CONFIG " ]; then
12- echo " $APP_CONFIG " > /usr/share/nginx/html/ app-config.js
12+ echo " $APP_CONFIG " > /usr/share/nginx/html${PUBLIC_URL} app-config.js
1313 echo " Using custom APP_CONFIG environment variable"
1414else
1515 echo " Not using custom APP_CONFIG"
1616fi
1717
18- if [ -f /usr/share/nginx/html/ app-config.js ]; then
19- if [ -s /usr/share/nginx/html/ app-config.js ]; then
18+ if [ -f /usr/share/nginx/html${PUBLIC_URL} app-config.js ]; then
19+ if [ -s /usr/share/nginx/html${PUBLIC_URL} app-config.js ]; then
2020 echo " Detected non-empty app-config.js. Ensuring .gz file is updated..."
21- rm -f /usr/share/nginx/html/ app-config.js.gz
22- gzip /usr/share/nginx/html/ app-config.js
23- touch /usr/share/nginx/html/ app-config.js
21+ rm -f /usr/share/nginx/html${PUBLIC_URL} app-config.js.gz
22+ gzip /usr/share/nginx/html${PUBLIC_URL} app-config.js
23+ touch /usr/share/nginx/html${PUBLIC_URL} app-config.js
2424 echo " Compressed app-config.js to app-config.js.gz"
2525 else
2626 echo " app-config.js is empty. Skipping compression."
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ RUN rm /etc/nginx/conf.d/default.conf
9393USER nginx
9494COPY --chown=nginx:nginx .docker/Viewer-v3.x /usr/src
9595RUN chmod 777 /usr/src/entrypoint.sh
96- COPY --from=builder /usr/src/app/platform/app/dist /usr/share/nginx/html
96+ COPY --from=builder /usr/src/app/platform/app/dist /usr/share/nginx/html${PUBLIC_URL}
9797COPY --from=builder /usr/src/app/platform/app/dist/index.html /usr/share/nginx/html
9898# In entrypoint.sh, app-config.js might be overwritten, so chmod it to be writeable.
9999# The nginx user cannot chmod it, so change to root.
You can’t perform that action at this time.
0 commit comments