From bd0d87eddc728ae75bcf0b9dd558c4fe41a945d0 Mon Sep 17 00:00:00 2001 From: Jason Madigan Date: Wed, 18 Dec 2024 12:39:03 +0000 Subject: [PATCH] Correct perms for dist folder, explicit copy & remove old .dockerignore. add test for file existence Signed-off-by: Jason Madigan --- .dockerignore | 2 -- Dockerfile | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 16c5327..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -dist - diff --git a/Dockerfile b/Dockerfile index b0ad6ca..dad0075 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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"]