fix: docker runtime

This commit is contained in:
shinya
2025-06-30 10:19:44 +08:00
parent ba94788932
commit 3c4ec1dc51
6 changed files with 7 additions and 5 deletions

View File

@@ -24,6 +24,8 @@ COPY . .
# 在构建阶段也显式设置 DOCKER_ENV
# 确保 Next.js 在编译时即选择 Node Runtime 而不是 Edge Runtime
RUN find ./src -type f -name "route.ts" -print0 \
| xargs -0 sed -i "s/export const runtime = 'edge';/export const runtime = 'nodejs';/g"
ENV DOCKER_ENV=true
# 生成生产构建