fix(prisma): use native binaryTarget and clean hardcoded engine paths
Some checks failed
Deploy Canina / deploy (push) Failing after 35s

This commit is contained in:
parsa aghaei 2026-08-15 16:01:27 +03:30
parent 8b0d3d972e
commit dbbf75e3c5
4 changed files with 1 additions and 7 deletions

View File

@ -14,7 +14,6 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
COPY package*.json ./
RUN npm ci --prefer-offline --no-audit
COPY . .
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
RUN ./node_modules/.bin/prisma generate && npm run build
FROM node:20-alpine
@ -28,7 +27,6 @@ COPY --chown=node:node --from=builder /app/dist ./dist
COPY --chown=node:node --from=builder /app/prisma ./prisma
COPY --chown=node:node --from=builder /app/prisma/tsconfig.seed.json ./prisma/tsconfig.seed.json
COPY --chown=node:node --from=builder /app/prisma/scientificTerms.ts ./prisma/scientificTerms.ts
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
EXPOSE 3000
USER node
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]

View File

@ -1,6 +1,6 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
binaryTargets = ["native"]
}
datasource db {

View File

@ -32,8 +32,6 @@ services:
- REDIS_HOST=redis_prod
- REDIS_PORT=6379
- PORT=3000
- PRISMA_SCHEMA_ENGINE_BINARY=/app/node_modules/@prisma/engines/schema-engine-linux-musl-openssl-3.0.x
- PRISMA_QUERY_ENGINE_LIBRARY=/app/node_modules/@prisma/engines/libquery_engine-linux-musl-openssl-3.0.x.so.node
volumes:
- canina_prod_uploads:/app/uploads
labels:

View File

@ -32,8 +32,6 @@ services:
- REDIS_HOST=redis_stage
- REDIS_PORT=6379
- PORT=3000
- PRISMA_SCHEMA_ENGINE_BINARY=/app/node_modules/@prisma/engines/schema-engine-linux-musl-openssl-3.0.x
- PRISMA_QUERY_ENGINE_LIBRARY=/app/node_modules/@prisma/engines/libquery_engine-linux-musl-openssl-3.0.x.so.node
volumes:
- canina_stage_uploads:/app/uploads
labels: