fix(docker): 为依赖安装阶段注入 Prisma 构建占位库连接
Some checks failed
CI / ci (push) Failing after 1m5s

在 deps 阶段设置 DATABASE_URL 占位值,确保 yarn install 触发 prisma generate 时不会因缺少 datasource.url 环境变量而失败。

Made-with: Cursor
This commit is contained in:
2026-04-28 06:11:28 +08:00
parent 0d451b8e03
commit 5dbdeebe6e

View File

@@ -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