File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 9
9
1 . 修改` build.sh ` 和` docker-compose.yml ` 中镜像版本,执行` sh build.sh ` 构建镜像
10
10
2 . 执行` docker-compose up -d ` 启动容器
11
11
3 . 执行` docker exec -it flask-api-demo bash ` 进入容器
12
- 4 . 执行` supervisorctl stop app ` 停止服务,并执行` flask run ` 或` python wsgi.py ` 进入开发者模式
12
+ 4 . 执行` supervisorctl stop webapp ` 停止服务,并执行` flask run ` 或` python wsgi.py ` 进入开发者模式
13
13
5 . 在` CHANGELOG.md ` 中记录版本日志,重新执行第一步发布镜像
14
14
15
15
## 运维调试
18
18
19
19
``` bash
20
20
# supervisorctl status
21
- app RUNNING pid 8, uptime 3 days, 5:35:50
21
+ webapp RUNNING pid 8, uptime 3 days, 5:35:50
22
22
worker RUNNING pid 10, uptime 3 days, 5:35:50
23
23
```
24
24
25
- 2 . 停止进程:` supervisorctl stop app `
26
- 3 . 启动进程:` supervisorctl start app `
25
+ 2 . 停止进程:` supervisorctl stop webapp `
26
+ 3 . 启动进程:` supervisorctl start webapp `
27
27
4 . 查看日志:` tail -f /data/log/webapp.log `
28
28
5 . 查看日志:` tail -f /data/log/worker.log `
29
29
Original file line number Diff line number Diff line change 1
- [program:app ]
1
+ [program:webapp ]
2
2
command = uwsgi /work/conf/uwsgi.ini
3
3
autostart = true
4
4
autorestart = true
5
5
# 将stderr的日志写入stdout日志文件中
6
6
redirect_stderr = true
7
- stdout_logfile = /data/log/supervisor .log
7
+ stdout_logfile = /data/log/webapp .log
8
8
# 杀死进程组包括子进程
9
9
stopasgroup = true
10
10
killasgroup = true
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ enable-threads = true
15
15
16
16
pidfile = /tmp/uwsgi.pid
17
17
# 指定日志文件
18
- logto = /data/log/webapp.log
18
+ ; logto = /data/log/webapp.log
19
19
# 输出到控制台
20
- ; log-master = true
20
+ log-master = true
21
21
harakiri = $(HTTP_TIMEOUT)
22
22
http-timeout = $(HTTP_TIMEOUT)
You can’t perform that action at this time.
0 commit comments