Add host-build deploy path for slow Docker npm installs

Install and build on the server host with npmmirror, then package a slim image without network during docker build.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 21:17:44 +03:30
co-authored by Cursor
parent ad236b7357
commit 56afc032d2
4 changed files with 92 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
# ایمیج سبک: فرض می‌کند روی خود سرور قبلاً npm ci + build زده‌ای
# هیچ دانلودی داخل Docker انجام نمی‌شود (مناسب سرور ایران)
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package.json package-lock.json ./
COPY node_modules ./node_modules
COPY dist ./dist
COPY prisma ./prisma
COPY prisma.config.ts ./
COPY docker-entrypoint.sh ./
RUN chmod +x docker-entrypoint.sh
EXPOSE 3000
ENTRYPOINT ["./docker-entrypoint.sh"]