From 9d35977ae35d6596647549b2c3f31c138938738a Mon Sep 17 00:00:00 2001 From: luochuan Date: Fri, 28 Jun 2024 18:21:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9b5899 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# 使用Node.js作为基础镜像 +FROM node:latest + +# 设置工作目录 +WORKDIR /app + +# 将应用的源代码复制到工作目录 +COPY . /app + +# 暴露应用使用的端口 +EXPOSE 3000 8080 + +# 启动应用 +# 服务端 +CMD nohup sh -c 'npm run prod && npm run serve' \ No newline at end of file