File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ RUN touch /run/nginx.pid
33
33
COPY ./compose/frontend/default.conf /etc/nginx/conf.d
34
34
# COPY nginx.conf /etc/nginx
35
35
COPY --from=buildnode /app/build /usr/share/nginx/html
36
- RUN chmod -R 777 /run /var/log/nginx /var/cache/nginx /usr/share/nginx/html/static/js /etc/nginx/conf.d
36
+ RUN chmod -R 777 /run /var/log/nginx /var/cache/nginx /usr/share/nginx/html/static/js /usr/share/nginx/html/static/css / etc/nginx/conf.d
37
37
38
38
ARG DEBUG_BUILD=false
39
39
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
MAIN=` find /usr/share/nginx/html/static/js/main.* .js`
4
+ MAINCSS=` find /usr/share/nginx/html/static/css/main.* .css`
4
5
echo -e " \nwindow.BASE_MAP='${REACT_APP_BASE_MAP} ';" >> $MAIN
5
6
echo -e " window.MAP_STYLE='${REACT_APP_MAP_STYLE} ';" >> $MAIN
6
7
echo -e " window.API_HOST='${REACT_APP_API_HOST} ';" >> $MAIN
@@ -13,5 +14,6 @@ echo -e "window.REPLAY_THE_DAY='${REACT_APP_REPLAY_THE_DAY}';" >> $MAIN
13
14
# Set the environment to be used for caching django content
14
15
sed -i " s~{ENVIRONMENT}~$ENVIRONMENT ~g" /etc/nginx/conf.d/default.conf
15
16
16
- # gzip the main js file to improve performance
17
- gzip -k $MAIN
17
+ # precompress the main js and css files to improve performance
18
+ gzip -k $MAIN
19
+ gzip -k $MAINCSS
You can’t perform that action at this time.
0 commit comments