Skip to content

Commit

Permalink
Correct perms for dist folder, explicit copy & remove old .dockerigno…
Browse files Browse the repository at this point in the history
…re. add test for file existence

Signed-off-by: Jason Madigan <[email protected]>
  • Loading branch information
jasonmadigan committed Dec 18, 2024
1 parent b9812f4 commit bd0d87e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN yarn config set network-concurrency 1 && \
yarn config set network-timeout 100000

RUN mkdir -p /var/cache/nginx /var/log/nginx /run && \
chmod -R 777 /var/cache/nginx /var/log/nginx /run
chmod -R 777 /var/cache/nginx /var/log/nginx /run /usr/share/nginx/html/

WORKDIR /usr/src/app

Expand All @@ -23,8 +23,15 @@ COPY . .

RUN yarn build

RUN cp -r dist /usr/share/nginx/html
COPY dist /usr/share/nginx/html

COPY entrypoint.sh /usr/share/nginx/html/entrypoint.sh

RUN test -f /usr/share/nginx/html/plugin-manifest.json && \
test -f /usr/share/nginx/html/plugin-entry.js && \
test -f /usr/share/nginx/html/entrypoint.sh && \
test -d /usr/share/nginx/html/locales && \
echo "All required files are present."

USER 1001
ENTRYPOINT ["/usr/share/nginx/html/entrypoint.sh"]

0 comments on commit bd0d87e

Please sign in to comment.