fix(frontend): ensure permissions for .next build directory in Dockerfile
Some checks failed
Deploy Canina / deploy (push) Failing after 34s

This commit is contained in:
parsa aghaei 2026-08-15 16:14:34 +03:30
parent cfc41e349d
commit 2a69654e96

View File

@ -1,4 +1,5 @@
FROM node:20-alpine AS app-builder
USER root
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_PUBLIC_API_URL=https://api.canina.ir/api
@ -13,11 +14,13 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
COPY frontend/application/package*.json ./
RUN npm ci --include=dev --prefer-offline --no-audit
COPY frontend/application ./
RUN mkdir -p /app/.next && chmod -R 777 /app
ARG NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
RUN npm run build
FROM node:20-alpine AS admin-builder
USER root
WORKDIR /app
ENV VITE_API_URL=https://api.canina.ir/api