Skip to content

Commit

Permalink
Fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliaweni committed Sep 20, 2024
1 parent 88407f5 commit 56538e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ RUN yarn build-only

FROM nginxinc/nginx-unprivileged:1.25-alpine

COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
COPY --from=builder --chown=nginx:nginx /app/dist /usr/share/nginx/html/commerce-webapp/
COPY docker/docker-entrypoint.sh /
# RUN mv /usr/share/nginx/html/commerce-webapp/index.html \
# && cd /usr/share/nginx/html/commerce-webapp/ \
# && ln -s /tmp/index.html

EXPOSE 8080

Expand Down
8 changes: 4 additions & 4 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
export JSON_STRING='window.configs = { \
// empty \
}'
sed "s|\/\/ CONFIGURATIONS_PLACEHOLDER|${JSON_STRING}|" /usr/share/nginx/html/commerce-webapp/index.html.tmpl > /tmp/index.html
# export JSON_STRING='window.configs = { \
# // empty \
# }'
# sed "s|\/\/ CONFIGURATIONS_PLACEHOLDER|${JSON_STRING}|" /usr/share/nginx/html/commerce-webapp/index.html.tmpl > /tmp/index.html

exec "$@"

0 comments on commit 56538e4

Please sign in to comment.