fix(prisma): use native binaryTarget and clean hardcoded engine paths
Some checks failed
Deploy Canina / deploy (push) Failing after 35s
Some checks failed
Deploy Canina / deploy (push) Failing after 35s
This commit is contained in:
parent
8b0d3d972e
commit
dbbf75e3c5
@ -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"]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
||||
binaryTargets = ["native"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user