在 deps 阶段设置 DATABASE_URL 占位值,确保 yarn install 触发 prisma generate 时不会因缺少 datasource.url 环境变量而失败。 Made-with: Cursor
This commit is contained in:
@@ -6,6 +6,7 @@ RUN npm i -g pm2
|
||||
FROM base AS deps
|
||||
COPY package.json yarn.lock ./
|
||||
COPY prisma ./prisma
|
||||
ENV DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:5432/postgres?schema=public"
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
FROM deps AS build
|
||||
|
||||
Reference in New Issue
Block a user