Merge branch 'pr77'

This commit is contained in:
Jalin
2019-01-22 11:58:40 +08:00
4 changed files with 29 additions and 2 deletions

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@ venv
__pycache__
env.py
env.slave.py
env.docker.py
env.docker.py
docker-compose.yml

View File

@@ -87,7 +87,7 @@ python main.py
## Docker 使用
**1. 将配置文件下载到本地***
**1. 将配置文件下载到本地**
```bash
docker run --rm pjialin/py12306 cat /config/env.py > env.py
# 或
@@ -100,6 +100,19 @@ docker run --rm --name py12306 -p 8008:8008 -d -v $(pwd):/config -v py12306:/dat
```
当前目录会多一个 12306.log 的日志文件, `tail -f 12306.log`
### Docker-compose 中使用
**1. 复制配置文件**
```
cp docker-compose.yml.example docker-compose.yml
```
**2. 从 docker-compose 运行**
`docker-compose.yml`所在的目录使用命令
```
docker-compose up -d
```
## Web 管理页面
目前支持用户和任务以及实时日志查看,更多功能后续会不断加入

View File

@@ -0,0 +1,12 @@
version: "2"
services:
py12306:
build: .
volumes:
- ./env.py:/config/env.py
- py12306:/data
ports:
- 8008:8008
volumes:
py12306:

View File

@@ -1,3 +1,4 @@
-i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
appdirs==1.4.3
beautifulsoup4==4.7.0
bs4==0.0.1