From 418a801eeed6d86ecc8d84fcd4f2f7c36861956f Mon Sep 17 00:00:00 2001 From: Jacob Date: Mon, 11 Aug 2025 21:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81docker-compose=E4=B8=80?= =?UTF-8?q?=E9=94=AE=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持修改端口、配置代理及路径映射挂载 --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..adb90cde --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "2" +services: + typeword: + image: "node:latest" + #environment: #按需配置,主要为了科学上网解决依赖安装网络问题 + # - HTTP_PROXY=http://127.0.0.1:80 + # HTTPS_PROXY=http://127.0.0.1:80 + working_dir: /home/node/app + volumes:#将代码目录直接映射到容器,节省打包拷贝时间 + - ./:/home/node/app + expose: + - "3000" + ports: + - "3000:3000" + command: + - /bin/bash + - -c + - | + npm install + npm start