Files
tianxuan-company/docker-deploy.md
Jowe 7fe1586dc0 feat: 添加 Docker 部署配置
- 添加 Dockerfile (多阶段构建: Node 构建 → Nginx 托管)
- 添加 docker-compose.yml (端口 8801, 自动重启)
- 添加 .dockerignore (减少构建体积)
- 添加 docker-deploy.md (部署文档)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:18:52 +08:00

60 lines
867 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 天选公司 - Docker 部署配置
## 快速部署
### 首次部署
```bash
# 1. 拉取代码
git pull
# 2. 构建并启动容器
docker-compose up -d --build
# 3. 查看日志
docker-compose logs -f
```
### 更新部署
```bash
# 1. 拉取最新代码
git pull
# 2. 重新构建并重启
docker-compose up -d --build
```
### 常用命令
```bash
# 启动
docker-compose up -d
# 停止
docker-compose down
# 重启
docker-compose restart
# 查看状态
docker-compose ps
# 查看日志
docker-compose logs -f
# 查看实时资源
docker stats
```
## 端口配置
- 容器内80 (Nginx)
- 宿主机映射8801
## 1Panel 反向代理配置
目标地址:`http://127.0.0.1:8801`
## 环境说明
- Node 版本20-alpine (构建阶段)
- Nginx 版本alpine (运行阶段)
- 构建产物直接打包进容器,无需在宿主机安装 Node.js