This commit is contained in:
2025-10-31 15:05:47 +03:30
parent 37c501890f
commit a96fbfa91c
23 changed files with 5324 additions and 295 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# ---- مرحله build ----
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
RUN npm run build
# ---- مرحله runtime ----
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
# فقط فایل‌های لازم
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package*.json ./
RUN npm install --omit=dev --legacy-peer-deps
EXPOSE 3000
CMD ["npm", "start"]