diff --git a/Dockerfile b/Dockerfile index d25d347..6b6dbdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 9edc7dc..3a9e0f0 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -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