diff --git a/Dockerfile b/Dockerfile index cddb24d..ecf45b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY --from=base /app/.next/static ./.next/static COPY --from=base /app/scripts ./scripts COPY --from=base /app/src/lib ./src/lib COPY --from=base /app/shared ./shared -COPY --from=base /app/tsconfig.json ./ +COPY tsconfig.json ./ COPY entrypoint.sh ./ RUN npm install -g tsx tsconfig-paths diff --git a/entrypoint.sh b/entrypoint.sh index 6abd00e..4a6dd3d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,8 +4,8 @@ set -e echo "[entrypoint] Starting monitor-ai..." -# 启动 MonitorWorker(后台,tsx + tsconfig-paths 解析路径别名) -npx tsx -r tsconfig-paths/register scripts/monitor-worker.ts & +# 启动 MonitorWorker(后台,tsx 即时执行 TypeScript) +npx tsx scripts/monitor-worker.ts & WORKER_PID=$! # 启动 Next.js standalone server