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