fix: use root user for creating tmp directory in backend docker container

This commit is contained in:
theoleuthardt 2025-03-04 15:35:57 +01:00
parent f8ad566e61
commit 92736be58f

View file

@ -58,10 +58,11 @@ COPY --from=builder --chown=fastify:nodejs /app/dist ./dist
COPY --from=deps --chown=fastify:nodejs /app/node_modules ./node_modules COPY --from=deps --chown=fastify:nodejs /app/node_modules ./node_modules
COPY --from=builder --chown=fastify:nodejs /app/package.json ./package.json COPY --from=builder --chown=fastify:nodejs /app/package.json ./package.json
USER fastify USER root
RUN mkdir -p /app/tmp && chown -R fastify:fastify /app/tmp RUN mkdir -p /app/tmp && chown -R fastify:fastify /app/tmp
USER fastify
EXPOSE 4000 EXPOSE 4000
ARG CORS_ALLOWED_ORIGIN ARG CORS_ALLOWED_ORIGIN