- Remove node_modules, dist, .next from git tracking - Add .next and *.tsbuildinfo to .gitignore - Remove Iranian mirrors from Dockerfiles (arvancloud.ir) - Add npm ci step for dependency installation - Ready for VPN-based internet access workflow
29 lines
363 B
Docker
29 lines
363 B
Docker
FROM node:22-alpine AS builder
|
|
|
|
RUN apk add --no-cache openssl
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npx prisma generate && npm run build
|
|
|
|
FROM node:22-alpine
|
|
|
|
RUN apk add --no-cache openssl
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
EXPOSE 3000
|
|
|
|
USER node
|
|
|
|
CMD ["node", "dist/main"]
|