Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
python
py12306
Commits
8b90194f
Commit
8b90194f
authored
Jan 22, 2019
by
Jalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 docker-compose 使用说明
parent
89c7e2b0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
.gitignore
.gitignore
+2
-1
README.md
README.md
+6
-6
docker-compose.yml.example
docker-compose.yml.example
+12
-0
No files found.
.gitignore
View file @
8b90194f
...
...
@@ -5,3 +5,4 @@ __pycache__
env.py
env.slave.py
env.docker.py
docker-compose.yml
\ No newline at end of file
README.md
View file @
8b90194f
...
...
@@ -100,14 +100,14 @@ docker run --rm --name py12306 -p 8008:8008 -d -v $(pwd):/config -v py12306:/dat
```
当前目录会多一个 12306.log 的日志文件,
`tail -f 12306.log`
## Docker-compose 使用
**1. 在py12306目录下创建config目录**
```
mkdir config```
### Docker-compose 中使用
**1. 复制配置文件**
```
cp docker-compose.yml.example docker-compose.yml
```
**2. 修改配置文件**
在`config`目录下,根据自己的个人配置创建`env.py`文件
**2. 从 docker-compose 运行**
**3. 运行docker程序**
在
`docker-compose.yml`
所在的目录使用命令
```
docker-compose up -d
...
...
docker-compose.yml
→
docker-compose.yml
.example
View file @
8b90194f
version: "2"
services:
go_home
:
py12306
:
build: .
volumes:
-
./config:/config
- ./env.py:/config/env.py
- py12306:/data
ports:
-
18008:8008
\ No newline at end of file
- 8008:8008
volumes:
py12306:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment