From 0c4b34a5540e0d6a826208edcc01d0cf343e5d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Thu, 26 Dec 2024 10:01:33 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- supervisor.conf | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd122d2..b166be2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ EXPOSE 8090 ENV TZ=Asia/Shanghai ENV PATH=/app/.venv/bin:$PATH -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.conf"] +CMD ["/bin/sh", "-c", "/usr/bin/supervisord -c /etc/supervisor.conf && tail -F /app/supervisord.log /app/xiaomusic.log.txt"] diff --git a/supervisor.conf b/supervisor.conf index 25baf48..47eaeca 100644 --- a/supervisor.conf +++ b/supervisor.conf @@ -3,8 +3,12 @@ file=/var/run/supervisor.sock ; Unix套接字文件路径 chmod=0777 ; 套接字权限 [supervisord] -nodaemon=true ; 非守护模式,适合容器运行 pidfile=/tmp/supervisord.pid ; PID文件路径 +logfile=/app/supervisord.log ; 日志文件路径 +logfile_maxbytes=50MB ; 日志文件的最大大小 +logfile_backups=3 ; 保留的旧日志文件数量 +loglevel=info ; 日志级别 + [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface