Skip to content

Commit

Permalink
Also run nginx master process as nginx user instead of only the child… (
Browse files Browse the repository at this point in the history
  • Loading branch information
4c0n authored Jan 17, 2025
1 parent 7c28838 commit 2b2eeca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2b2eeca

Please sign in to comment.