Dockerfile 部署
This commit is contained in:
@@ -41,4 +41,5 @@ EXPOSE 5050
|
||||
# 1. 清理可能因异常重启遗留的虚拟屏幕锁文件(防止 xvfb 报错退出)
|
||||
# 2. 切换到 web_ui 目录执行 gunicorn
|
||||
# 3. 使用 xvfb-run -a 自动分配空闲的虚拟屏幕
|
||||
CMD sh -c "rm -f /tmp/.X*-lock && cd web_ui && xvfb-run -a --server-args='-screen 0 1920x1080x24' gunicorn -w 4 -b 0.0.0.0:5050 --timeout 120 app:app"
|
||||
# 4. 增加 --access-logfile - 参数,让 Gunicorn 输出 HTTP 访问日志
|
||||
CMD sh -c "rm -f /tmp/.X*-lock && cd web_ui && xvfb-run -a --server-args='-screen 0 1920x1080x24' gunicorn -w 4 -b 0.0.0.0:5050 --access-logfile - --timeout 120 app:app"
|
||||
|
||||
Reference in New Issue
Block a user