From 91af6379e82d1517a7991593d0078cd55be70b79 Mon Sep 17 00:00:00 2001 From: luochuan Date: Sat, 29 Jun 2024 11:08:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=AF=E5=8A=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 +-- start.sh | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 start.sh diff --git a/Dockerfile b/Dockerfile index b9b5899..12ebc78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,4 @@ COPY . /app EXPOSE 3000 8080 # 启动应用 -# 服务端 -CMD nohup sh -c 'npm run prod && npm run serve' \ No newline at end of file +ENTRYPOINT [ "sh" ,"start.sh"] diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..a164908 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +# 服务端启动 +nohup npm run prod >> server.log 2>&1 & +# 客户端启动 +nohup npm run serve >> front.log 2>&1 &