mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-10-14 23:22:42 +00:00
[feat] 优化日志输出方式
This commit is contained in:
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
backend-to-api:
|
||||
image: wizerd/pandora-to-api:0.0.4
|
||||
image: wizerd/pandora-to-api:0.0.5
|
||||
restart: always
|
||||
ports:
|
||||
- "50011:33333"
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
- ./log:/app/log
|
||||
|
||||
uploader:
|
||||
image: wizerd/pandora-to-api:0.0.4
|
||||
image: wizerd/pandora-to-api:0.0.5
|
||||
restart: always
|
||||
entrypoint: ["python3", "/app/upload.py"]
|
||||
volumes:
|
||||
|
4
start.sh
4
start.sh
@@ -3,8 +3,8 @@
|
||||
# 记录当前日期和时间
|
||||
NOW=$(date +"%Y-%m-%d-%H-%M")
|
||||
|
||||
# 启动Gunicorn
|
||||
exec gunicorn -w 2 --threads 2 --bind 0.0.0.0:33333 main:app --access-logfile "./log/access-${NOW}.log" --error-logfile "./log/error-${NOW}.log"
|
||||
# 启动 Gunicorn 并使用 tee 命令同时输出日志到文件和控制台
|
||||
exec gunicorn -w 2 --threads 2 --bind 0.0.0.0:33333 main:app --access-logfile - --error-logfile - | tee "./log/access-${NOW}.log"
|
||||
|
||||
# python3 ./main.py
|
||||
|
||||
|
Reference in New Issue
Block a user