refactor: selenium镜像添加cpu和内存限制

This commit is contained in:
xuwei-fit2cloud 2024-06-03 11:24:40 +08:00
parent 9e58760b43
commit 80a223daf7
2 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,11 @@ services:
container_name: de-selenium container_name: de-selenium
shm_size: 2gb shm_size: 2gb
privileged: true privileged: true
deploy:
resources:
limits:
cpus: ${DE_SELENIUM_CPU_LIMIT}
memory: ${DE_SELENIUM_MEM_LIMIT}
environment: environment:
- SE_START_XVFB=false - SE_START_XVFB=false
- SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true - SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true

View File

@ -23,3 +23,9 @@ DE_MYSQL_USER=root
DE_MYSQL_PASSWORD=Password123@mysql 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 镜像 CPU 限制
DE_SELENIUM_CPU_LIMIT='1'
## selenium 镜像 内存 限制
DE_SELENIUM_MEM_LIMIT=2g