From d430d055f5b371f9c40a0f56a4016527c77c394f Mon Sep 17 00:00:00 2001 From: Quan Tran Date: Tue, 14 Jun 2022 16:14:46 +0700 Subject: [PATCH] TF-615 Gzip env.file on container startup --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d518b42ae..efb3ce189 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,11 +38,11 @@ RUN cd core \ # Stage 2 - Create the run-time image FROM nginx:stable -RUN chmod -R 755 /usr/share/nginx/html +RUN chmod -R 755 /usr/share/nginx/html && apt install -y gzip COPY --from=build-env /app/server/nginx.conf /etc/nginx COPY --from=build-env /app/build/web /usr/share/nginx/html # Record the exposed port EXPOSE 80 -ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file +CMD gzip -k -f /usr/share/nginx/html/assets/env.file && nginx -g 'daemon off;' \ No newline at end of file