From 39f4448674764dcda18445a4e548a8bc56e667dc Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 16 Jun 2025 14:22:02 +0800 Subject: [PATCH] . --- apps/blogai/Dockerfile | 2 +- apps/blogai/app/api/health/route.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/blogai/Dockerfile b/apps/blogai/Dockerfile index ed9dc95..97d0fa0 100644 --- a/apps/blogai/Dockerfile +++ b/apps/blogai/Dockerfile @@ -61,7 +61,7 @@ RUN chmod +x /plugai/wrapper.sh RUN rm -rf /root/.npm /root/.pnpm-store /tmp/* -HEALTHCHECK --interval=30s --timeout=3s --start-period=25s --retries=3 CMD curl -fs http://localhost:3008/api/health || exit 1 +HEALTHCHECK --interval=30s --timeout=3s --start-period=25s --retries=3 CMD curl -fs http://localhost:3008/api/health/ || exit 1 EXPOSE 3008 diff --git a/apps/blogai/app/api/health/route.ts b/apps/blogai/app/api/health/route.ts index cb53326..21a827e 100644 --- a/apps/blogai/app/api/health/route.ts +++ b/apps/blogai/app/api/health/route.ts @@ -1,6 +1,8 @@ import { NextResponse } from 'next/server' import { getRuntimeEnv } from '@/lib/ipconfig' // 路径按你项目实际调整 +export const runtime = 'nodejs' + export async function GET() { let ip: string | null = null let res: string | undefined = undefined