From e510de878d1a951605c0f916b7e13eb84085109b Mon Sep 17 00:00:00 2001 From: Jalin Date: Thu, 10 Jan 2019 17:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Docker=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 * 支持分布式集群