diff --git a/Dockerfile b/Dockerfile index 811ae8d..8e6890f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,10 +30,18 @@ RUN pnpm build FROM nginx:stable-alpine AS admin_meldingen WORKDIR /usr/share/nginx/html -RUN rm -rf ./* + +RUN set -eux; \ + rm -rf ./*; \ + mkdir -p /var/cache/nginx; \ + chown -R nginx:nginx /var/cache/nginx; \ + touch /var/run/nginx.pid; \ + chown -R nginx:nginx /var/run/nginx.pid COPY --from=build /app/apps/admin/dist ./ +USER nginx + CMD exec nginx -g 'daemon off;' EXPOSE 3001