fix(docker): copy prisma schema before npm ci and ensure prisma client target dir exists
Some checks failed
Deploy Canina / deploy (push) Failing after 1m33s
Some checks failed
Deploy Canina / deploy (push) Failing after 1m33s
This commit is contained in:
parent
32041fb4f3
commit
23a31203e3
@ -2,7 +2,6 @@ FROM node:20-alpine AS builder
|
|||||||
USER root
|
USER root
|
||||||
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
|
RUN http_proxy=http://172.17.0.1:8888 https_proxy=http://172.17.0.1:8888 apk add --no-cache openssl || apk add --no-cache openssl || true
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
|
|
||||||
|
|
||||||
# Optional: Use Nexus as npm registry (pass --build-arg NPM_REGISTRY=http://nexus:8081/repository/npm/)
|
# Optional: Use Nexus as npm registry (pass --build-arg NPM_REGISTRY=http://nexus:8081/repository/npm/)
|
||||||
ARG NPM_REGISTRY=
|
ARG NPM_REGISTRY=
|
||||||
@ -13,9 +12,10 @@ RUN if [ -n "$NPM_REGISTRY" ]; then \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
COPY prisma ./prisma/
|
||||||
RUN npm ci --prefer-offline --no-audit
|
RUN npm ci --prefer-offline --no-audit
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN mkdir -p /app/node_modules/.prisma && 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
|
RUN mkdir -p /app/node_modules/.prisma/client && 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
|
FROM node:20-alpine
|
||||||
USER root
|
USER root
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2
graphify-out/cache/stat-index.json
vendored
2
graphify-out/cache/stat-index.json
vendored
File diff suppressed because one or more lines are too long
22620
graphify-out/graph.json
22620
graphify-out/graph.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user