修正启动脚本

This commit is contained in:
2026-03-25 14:26:03 +08:00
parent a8b9805b24
commit 5c10ec3794
2 changed files with 1 additions and 4 deletions

View File

@@ -43,9 +43,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
# Copy Dart AOT runtime from build stage
COPY --from=backend-build /runtime/ /
# Copy the compiled Dart server
COPY --from=backend-build /app/bin/server /app/bin/server

View File

@@ -20,7 +20,7 @@ node index.js &
FRONTEND_PID=$!
# 捕获退出信号,优雅关闭两个服务
trap "echo 'Shutting down...'; kill $BACKEND_PID $FRONTEND_PID 2>/dev/null; exit 0" SIGTERM SIGINT
trap "echo 'Shutting down...'; kill $BACKEND_PID $FRONTEND_PID 2>/dev/null; exit 0" TERM INT
# 等待任意进程退出
wait -n $BACKEND_PID $FRONTEND_PID