支持docker-compose一键启动

支持修改端口、配置代理及路径映射挂载
This commit is contained in:
Jacob
2025-08-11 21:27:50 +08:00
committed by GitHub
parent 29684ff810
commit 418a801eee

20
docker-compose.yml Normal file
View File

@@ -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