canina/backend/Dockerfile
devops 2c47e35153
All checks were successful
Deploy Canina / deploy (push) Successful in 1m8s
fix: IngredientWiki fallback to scientificTerms from API with keywords as benefits
2026-07-14 12:27:43 +00:00

21 lines
699 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
RUN mkdir -p /app/uploads && chown node:node /app/uploads
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"]