Compare commits

...

1 Commits

Author SHA1 Message Date
alejandrobailo
e0e4288715 chore(docker): add Next.js cache directory configuration in Dockerfile 2025-09-09 14:51:19 +02:00

View File

@@ -57,6 +57,7 @@ WORKDIR /app
# Set up environment for production
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_CACHE_DIR=/app/.next/cache
RUN addgroup --system --gid 1001 nodejs &&\
adduser --system --uid 1001 nextjs
@@ -65,6 +66,10 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
# Ensure Next.js cache directory exists and is writable
RUN mkdir -p /app/.next/cache && \
chown -R nextjs:nodejs /app/.next
USER nextjs
EXPOSE 3000