diff --git a/Dockerfile.prod b/Dockerfile.prod index 62df932b..196f42ab 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -23,6 +23,7 @@ COPY --from=builder /app/build /usr/share/nginx/html/ WORKDIR /usr/share/nginx/html COPY ./env.sh . COPY .env . +COPY .env-config.js . USER root @@ -30,13 +31,11 @@ USER root RUN apk add --no-cache bash # Make our shell script executable -RUN chmod +x env.sh - -RUN /usr/share/nginx/html/env.sh +RUN chmod +x env.sh && chmod 777 /usr/share/nginx/html/env-config.js EXPOSE 8080 USER nginx # Start Nginx server -CMD ["/bin/bash", "-c", "nginx -g \"daemon off;\""] \ No newline at end of file +CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] \ No newline at end of file