mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 12:22:10 +08:00
refactor: playwright 替换 selenium
This commit is contained in:
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 9e5779488a...2312242228
23
installer/dataease/docker-compose-playwright.yml
Normal file
23
installer/dataease/docker-compose-playwright.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
image: registry.cn-qingdao.aliyuncs.com/dataease/de-playwright-api:v1.58.2-noble
|
||||||
|
container_name: de-playwright-api
|
||||||
|
privileged: true
|
||||||
|
environment:
|
||||||
|
- CONCURRENCY=${DE_PLAYWRIGHT_CONCURRENCY}
|
||||||
|
volumes:
|
||||||
|
- ${DE_BASE}/dataease2.0/logs:/opt/app/logs
|
||||||
|
restart: unless-stopped
|
||||||
|
init: true
|
||||||
|
ipc: host
|
||||||
|
shm_size: ${DE_PLAYWRIGHT_SHM_SIZE}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
networks:
|
||||||
|
- dataease-network
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
services:
|
|
||||||
de-selenium:
|
|
||||||
image: registry.cn-qingdao.aliyuncs.com/dataease/standalone-chromium:123.0
|
|
||||||
container_name: de-selenium
|
|
||||||
shm_size: 2gb
|
|
||||||
privileged: true
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpus: ${DE_SELENIUM_CPU_LIMIT}
|
|
||||||
memory: ${DE_SELENIUM_MEM_LIMIT}
|
|
||||||
environment:
|
|
||||||
- SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true
|
|
||||||
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
|
|
||||||
- SE_NODE_MAX_SESSIONS=5
|
|
||||||
- TZ=Asia/Shanghai
|
|
||||||
networks:
|
|
||||||
- dataease-network
|
|
||||||
@@ -23,8 +23,8 @@ dataease:
|
|||||||
limit: ${DE_EXPORT_DATASET_LIMIT}
|
limit: ${DE_EXPORT_DATASET_LIMIT}
|
||||||
origin-list: ${DE_ORIGIN_LIST}
|
origin-list: ${DE_ORIGIN_LIST}
|
||||||
login_timeout: ${DE_LOGIN_TIMEOUT}
|
login_timeout: ${DE_LOGIN_TIMEOUT}
|
||||||
selenium-server: ${DE_SELENIUM_SERVER}
|
|
||||||
dataease-servers: ${DE_SERVERS}
|
dataease-servers: ${DE_SERVERS}
|
||||||
|
playwright-server: ${DE_PLAYWRIGHT_SERVER}
|
||||||
task:
|
task:
|
||||||
executor:
|
executor:
|
||||||
address: http://sync-task-actuator:9001
|
address: http://sync-task-actuator:9001
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ function _generate_compose_file_args() {
|
|||||||
compose_files="${compose_files} -f docker-compose-task.yml"
|
compose_files="${compose_files} -f docker-compose-task.yml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f $DE_RUNNING_BASE/docker-compose-selenium.yml ]] && [[ "$DE_EXTERNAL_SELENIUM" != "true" ]];then
|
if [[ -f $DE_RUNNING_BASE/docker-compose-playwright.yml ]] && [[ "$DE_EXTERNAL_PLAYWRIGHT" != "true" ]];then
|
||||||
compose_files="${compose_files} -f docker-compose-selenium.yml"
|
compose_files="${compose_files} -f docker-compose-playwright.yml"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,14 +27,11 @@ DE_MYSQL_PASSWORD=Password123@mysql
|
|||||||
DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true"
|
DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true"
|
||||||
|
|
||||||
# 定时报告镜像配置
|
# 定时报告镜像配置
|
||||||
## 是否使用外部 Selenium,若使用外部 Selenium,则限制参数无效
|
## 是否使用外部 Playwright,若使用外部 Playwright,则限制参数无效
|
||||||
DE_EXTERNAL_SELENIUM=false
|
DE_EXTERNAL_PLAYWRIGHT=false
|
||||||
## Selenium 服务地址
|
DE_PLAYWRIGHT_SERVER=http://de-playwright-api:3000/screenshot
|
||||||
DE_SELENIUM_SERVER=http://de-selenium:4444/wd/hub
|
DE_PLAYWRIGHT_CONCURRENCY=4
|
||||||
## selenium 镜像 CPU 限制
|
DE_PLAYWRIGHT_SHM_SIZE=2gb
|
||||||
DE_SELENIUM_CPU_LIMIT='1'
|
|
||||||
## selenium 镜像 内存 限制
|
|
||||||
DE_SELENIUM_MEM_LIMIT=2g
|
|
||||||
|
|
||||||
# APISIX配置
|
# APISIX配置
|
||||||
## 是否使用外部 APISIX
|
## 是否使用外部 APISIX
|
||||||
|
|||||||
Reference in New Issue
Block a user