mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
Merge pull request #5250 from ixff/v2
This commit is contained in:
@@ -407,6 +407,8 @@ class ConfigModel(BaseModel):
|
|||||||
# ==================== Docker配置 ====================
|
# ==================== Docker配置 ====================
|
||||||
# Docker Client API地址
|
# Docker Client API地址
|
||||||
DOCKER_CLIENT_API: Optional[str] = "tcp://127.0.0.1:38379"
|
DOCKER_CLIENT_API: Optional[str] = "tcp://127.0.0.1:38379"
|
||||||
|
# Playwright浏览器类型,chromium/firefox
|
||||||
|
PLAYWRIGHT_BROWSER_TYPE: str = "chromium"
|
||||||
|
|
||||||
# ==================== AI智能体配置 ====================
|
# ==================== AI智能体配置 ====================
|
||||||
# AI智能体开关
|
# AI智能体开关
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from app.utils.http import RequestUtils, cookie_parse
|
|||||||
|
|
||||||
|
|
||||||
class PlaywrightHelper:
|
class PlaywrightHelper:
|
||||||
def __init__(self, browser_type="chromium"):
|
def __init__(self, browser_type=settings.PLAYWRIGHT_BROWSER_TYPE):
|
||||||
self.browser_type = browser_type
|
self.browser_type = browser_type
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ COPY --from=prepare_venv --chmod=777 ${VENV_PATH} ${VENV_PATH}
|
|||||||
|
|
||||||
# playwright 环境
|
# playwright 环境
|
||||||
RUN playwright install-deps chromium \
|
RUN playwright install-deps chromium \
|
||||||
|
&& playwright install-deps firefox \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
|
|||||||
@@ -231,9 +231,9 @@ chown moviepilot:moviepilot /etc/hosts /tmp
|
|||||||
|
|
||||||
# 下载浏览器内核
|
# 下载浏览器内核
|
||||||
if [[ "$HTTPS_PROXY" =~ ^https?:// ]] || [[ "$HTTPS_PROXY" =~ ^https?:// ]] || [[ "$PROXY_HOST" =~ ^https?:// ]]; then
|
if [[ "$HTTPS_PROXY" =~ ^https?:// ]] || [[ "$HTTPS_PROXY" =~ ^https?:// ]] || [[ "$PROXY_HOST" =~ ^https?:// ]]; then
|
||||||
HTTPS_PROXY="${HTTPS_PROXY:-${https_proxy:-$PROXY_HOST}}" gosu moviepilot:moviepilot playwright install chromium
|
HTTPS_PROXY="${HTTPS_PROXY:-${https_proxy:-$PROXY_HOST}}" gosu moviepilot:moviepilot playwright install ${PLAYWRIGHT_BROWSER_TYPE:-chromium}
|
||||||
else
|
else
|
||||||
gosu moviepilot:moviepilot playwright install chromium
|
gosu moviepilot:moviepilot playwright install ${PLAYWRIGHT_BROWSER_TYPE:-chromium}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 证书管理
|
# 证书管理
|
||||||
|
|||||||
Reference in New Issue
Block a user