fix(backend): install openssl via proxy to enable prisma native engine detection
Deploy Canina / deploy (push) Failing after 1m38s

This commit is contained in:
parsa aghaei committed 2026-08-15 16:08:17 +03:30
1 parent 9a65aa48cd
commit 034d4c71b0
1 file changed
+2 -4
+2 -4
View File
@@ -1,5 +1,5 @@
FROM node:20-alpine AS builder
RUN apk add --no-cache openssl 2>/dev/null || true
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl 2>/dev/null || apk add --no-cache openssl 2>/dev/null || true
WORKDIR /app
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
@@ -14,12 +14,10 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
COPY package*.json ./
RUN npm ci --prefer-offline --no-audit
COPY . .
ENV PRISMA_SCHEMA_ENGINE_BINARY=/app/node_modules/@prisma/engines/schema-engine-linux-musl-openssl-3.0.x
ENV PRISMA_QUERY_ENGINE_LIBRARY=/app/node_modules/@prisma/engines/libquery_engine-linux-musl-openssl-3.0.x.so.node
RUN ./node_modules/.bin/prisma generate && npm run build
FROM node:20-alpine
RUN apk add --no-cache openssl 2>/dev/null || true
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl 2>/dev/null || apk add --no-cache openssl 2>/dev/null || true
RUN mkdir -p /app/uploads && chown node:node /app/uploads
WORKDIR /app
COPY --chown=node:node --from=builder /app/package*.json ./