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 &