Skip to content

Commit 067fde7

Browse files
committed
Add CSS
1 parent ffba1a3 commit 067fde7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

compose/frontend/StaticBuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN touch /run/nginx.pid
3333
COPY ./compose/frontend/default.conf /etc/nginx/conf.d
3434
# COPY nginx.conf /etc/nginx
3535
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
3737

3838
ARG DEBUG_BUILD=false
3939

compose/frontend/entrypoint

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
MAIN=`find /usr/share/nginx/html/static/js/main.*.js`
4+
MAINCSS=`find /usr/share/nginx/html/static/css/main.*.css`
45
echo -e "\nwindow.BASE_MAP='${REACT_APP_BASE_MAP}';" >> $MAIN
56
echo -e "window.MAP_STYLE='${REACT_APP_MAP_STYLE}';" >> $MAIN
67
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
1314
# Set the environment to be used for caching django content
1415
sed -i "s~{ENVIRONMENT}~$ENVIRONMENT~g" /etc/nginx/conf.d/default.conf
1516

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

0 commit comments

Comments
 (0)