From c7148cab5adf43a5456201ab3c83b01a20cae183 Mon Sep 17 00:00:00 2001 From: Wizerd Date: Thu, 14 Dec 2023 12:11:21 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 4 ++-- start.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3e3588c..8ca4187 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/start.sh b/start.sh index ef160c1..e33d7f7 100755 --- a/start.sh +++ b/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