fix(backend): fix dist output structure and runtime entrypoint in Dockerfile
Deploy Canina / deploy (push) Successful in 32s

This commit is contained in:
parsa aghaei committed 2026-08-16 14:31:09 +03:30
1 parent fd5eb9dd1d
commit f1b77f3fba
2 files changed
+6 -3

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
COPY package*.json ./
RUN npm ci --prefer-offline --no-audit
COPY . .
RUN https_proxy=http://172.17.0.1:8888 http_proxy=http://172.17.0.1:8888 ./node_modules/.bin/prisma generate && npm run build
RUN rm -rf dist && https_proxy=http://172.17.0.1:8888 http_proxy=http://172.17.0.1:8888 ./node_modules/.bin/prisma generate && npm run build
FROM node:20-alpine
USER root
@@ -31,4 +31,4 @@ COPY --chown=node:node --from=builder /app/prisma/tsconfig.seed.json ./prisma/ts
COPY --chown=node:node --from=builder /app/prisma/scientificTerms.ts ./prisma/scientificTerms.ts
EXPOSE 3000
USER node
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]
CMD ["sh", "-c", "npx prisma migrate deploy && if [ -f dist/src/main.js ]; then node dist/src/main.js; else node dist/main.js; fi"]