canina/backend/Dockerfile
DevOps 3c8f7729c2
Some checks failed
Deploy Canina / deploy (push) Failing after 1m45s
ci: use sh shell instead of bash for ci-runner (Alpine based)
2026-07-14 03:32:53 +00:00

20 lines
641 B
Docker

FROM node:22-alpine AS builder
RUN apk add --no-cache openssl
WORKDIR /app
COPY package*.json ./
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
COPY . .
RUN npx prisma generate && npm run build
FROM node:22-alpine
RUN apk add --no-cache openssl
WORKDIR /app
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/prisma/scientificTerms.ts ./prisma/scientificTerms.ts
EXPOSE 3000
USER node
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]