Compare commits
2
Commits
65f3d7ebec
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36a4704d69 | ||
|
|
d1c1a371ca |
@@ -19,6 +19,9 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
|
|||||||
# ---- 构建层:生成 Prisma Client + Next.js 产物 ----
|
# ---- 构建层:生成 Prisma Client + Next.js 产物 ----
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production
|
ENV NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production
|
||||||
|
# 限制 V8 老生代堆上限(MB),需略低于容器内存限额,让 V8 主动 GC 而非被 OOM Killer 强杀
|
||||||
|
# 默认 2048MB,按实际容器内存调整(例如容器限 3G 则设 2560,留余量给非堆开销)
|
||||||
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||||
# 构建时仅需 DATABASE_URL(db:generate 生成 Drizzle Client)
|
# 构建时仅需 DATABASE_URL(db:generate 生成 Drizzle Client)
|
||||||
ARG DATABASE_URL
|
ARG DATABASE_URL
|
||||||
ENV DATABASE_URL=${DATABASE_URL}
|
ENV DATABASE_URL=${DATABASE_URL}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ import type { NextConfig } from "next";
|
|||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
reactCompiler: true,
|
reactCompiler: true,
|
||||||
|
typescript: {
|
||||||
|
// 跳过 next build 期间的 tsc 类型检查(CPU 密集),类型安全由本地/CI 跑 `pnpm typecheck` 兜底
|
||||||
|
ignoreBuildErrors: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "biome check",
|
"lint": "biome check",
|
||||||
"format": "biome format --write",
|
"format": "biome format --write",
|
||||||
|
"typecheck": "tsc --noEmit",
|
||||||
"db:generate": "drizzle-kit generate",
|
"db:generate": "drizzle-kit generate",
|
||||||
"db:migrate": "drizzle-kit migrate",
|
"db:migrate": "drizzle-kit migrate",
|
||||||
"db:push": "drizzle-kit push",
|
"db:push": "drizzle-kit push",
|
||||||
|
|||||||
Reference in New Issue
Block a user