diff --git a/README.md b/README.md index 80801af..ec5ad6d 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,21 @@ python main.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 * 支持分布式集群