增加 Docker 使用说明

This commit is contained in:
Jalin
2019-01-10 17:41:51 +08:00
parent e17b48a0ce
commit e510de878d

View File

@@ -81,6 +81,21 @@ python main.py
目前提供了一个单独的子节点配置文件 `env.slave.py.example` 将文件修改为 `env.slave.py` 通过 `python main -c env.slave.py` 即可快速启动 目前提供了一个单独的子节点配置文件 `env.slave.py.example` 将文件修改为 `env.slave.py` 通过 `python main -c env.slave.py` 即可快速启动
## Docker 使用
**1. 将配置文件下载到本地**
```bash
docker run --rm pjialin/py12306 cat /config/env.py > env.py
# 或
curl https://raw.githubusercontent.com/pjialin/py12306/master/env.docker.py.example -o env.py
```
**2. 修改好配置后运行 **
```bash
docker run -d -v $(pwd):/config -v py12306:/data pjialin/py12306
```
当前目录会多一个 12306.log 的日志文件, `tail -f 12306.log`
## 更新 ## 更新
### 19-01-10 ### 19-01-10
* 支持分布式集群 * 支持分布式集群