mirror of
https://github.com/halfwaystudent/douyin-sparkflow.git
synced 2026-08-28 19:47:03 +08:00
Use configurable Playwright base image mirror
This commit is contained in:
@@ -10,6 +10,11 @@ PROXY_CONTROLLER_PORT=9090
|
||||
PROXY_SUB_URL=
|
||||
PROXY_USER_AGENT=clash-verge/1.7.7
|
||||
|
||||
# The Playwright base image is large. The default mirror is faster on mainland China servers.
|
||||
# If the mirror is unavailable, change it back to:
|
||||
# PLAYWRIGHT_BASE_IMAGE=mcr.microsoft.com/playwright/python:v1.56.0-jammy
|
||||
PLAYWRIGHT_BASE_IMAGE=swr.cn-north-4.myhuaweicloud.com/ddn-k8s/mcr.microsoft.com/playwright/python:v1.56.0-jammy
|
||||
|
||||
# Optional build-time proxy. Leave empty unless your Docker build needs a proxy.
|
||||
HTTP_PROXY_BUILD=
|
||||
HTTPS_PROXY_BUILD=
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM mcr.microsoft.com/playwright/python:v1.56.0-jammy
|
||||
ARG PLAYWRIGHT_BASE_IMAGE=mcr.microsoft.com/playwright/python:v1.56.0-jammy
|
||||
FROM ${PLAYWRIGHT_BASE_IMAGE}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -70,6 +70,12 @@ docker compose restart proxy
|
||||
|
||||
如果 `.env` 里的 `PROXY_SUB_URL` 为空,系统会使用 `proxy/config.example.yaml` 生成一个直连配置。
|
||||
|
||||
首次构建会拉取较大的 Playwright 基础镜像。默认 `.env.example` 使用国内同步源以加速下载;如果同步源不可用,可以把 `.env` 里的 `PLAYWRIGHT_BASE_IMAGE` 改回:
|
||||
|
||||
```bash
|
||||
PLAYWRIGHT_BASE_IMAGE=mcr.microsoft.com/playwright/python:v1.56.0-jammy
|
||||
```
|
||||
|
||||
## 目录结构
|
||||
|
||||
- `DouYinSparkFlow/`:核心应用、Web UI、登录桌面和发送任务。
|
||||
|
||||
@@ -94,7 +94,7 @@ prepare_runtime_files() {
|
||||
run_root cp "$APP_ROOT/.env.example" "$APP_ROOT/.env"
|
||||
fi
|
||||
set_env_value "$APP_ROOT/.env" "APP_ROOT" "$APP_ROOT"
|
||||
for key in TZ WEB_PORT LOGIN_DESKTOP_WEB_PORT PROXY_HTTP_PORT PROXY_CONTROLLER_PORT PROXY_SUB_URL HTTP_PROXY_BUILD HTTPS_PROXY_BUILD ALL_PROXY_BUILD; do
|
||||
for key in TZ WEB_PORT LOGIN_DESKTOP_WEB_PORT PROXY_HTTP_PORT PROXY_CONTROLLER_PORT PROXY_SUB_URL PLAYWRIGHT_BASE_IMAGE HTTP_PROXY_BUILD HTTPS_PROXY_BUILD ALL_PROXY_BUILD; do
|
||||
if [ -n "${!key:-}" ]; then
|
||||
set_env_value "$APP_ROOT/.env" "$key" "${!key}"
|
||||
fi
|
||||
|
||||
@@ -20,6 +20,7 @@ services:
|
||||
dockerfile: Dockerfile.server
|
||||
network: host
|
||||
args:
|
||||
PLAYWRIGHT_BASE_IMAGE: ${PLAYWRIGHT_BASE_IMAGE:-swr.cn-north-4.myhuaweicloud.com/ddn-k8s/mcr.microsoft.com/playwright/python:v1.56.0-jammy}
|
||||
HTTP_PROXY: ${HTTP_PROXY_BUILD:-}
|
||||
HTTPS_PROXY: ${HTTPS_PROXY_BUILD:-}
|
||||
ALL_PROXY: ${ALL_PROXY_BUILD:-}
|
||||
|
||||
Reference in New Issue
Block a user