diff --git a/entrypoint.sh b/entrypoint.sh index dafaa30..6abd00e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,11 +23,11 @@ cleanup() { } trap cleanup SIGTERM SIGINT -# 守护循环:任一进程退出则容器退出 +# 守护循环:Next.js 退出则容器退出,Worker 失败仅警告 while true; do if ! kill -0 $WORKER_PID 2>/dev/null; then - echo "[entrypoint] Worker process exited" >&2 - exit 1 + echo "[entrypoint] Worker process exited (non-fatal)" >&2 + WORKER_PID=0 fi if ! kill -0 $NEXT_PID 2>/dev/null; then echo "[entrypoint] Next.js process exited" >&2