File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66# =============================================================================
77
88# 主机上映射的端口 (外部访问端口)
9- HOST_FASTAPI_PORT=8080
10- HOST_STREAM_PORT=8081
9+ HOST_FASTAPI_PORT=2048
10+ HOST_STREAM_PORT=3120
1111
1212# =============================================================================
1313# 容器内服务端口配置
@@ -118,6 +118,13 @@ USERSCRIPT_PATH=browser_utils/more_modles.js
118118# Docker 特定配置
119119# =============================================================================
120120
121+ # 容器内存限制
122+ # 默认不限制。如需限制容器资源,请在你的 .env 文件中取消注释并设置以下值。
123+ # 例如: DOCKER_MEMORY_LIMIT=1g或DOCKER_MEMORY_LIMIT=1024m
124+ # 注意:DOCKER_MEMORY_LIMIT和DOCKER_MEMSWAP_LIMIT相同时,不会使用SWAP
125+ # DOCKER_MEMORY_LIMIT=
126+ # DOCKER_MEMSWAP_LIMIT=
127+
121128# 容器重启策略相关
122129# 这些配置项在 docker-compose.yml 中使用
123130
Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ services:
44 context : ..
55 dockerfile : docker/Dockerfile
66 container_name : ai-studio-proxy-container
7+ mem_limit : ${DOCKER_MEMORY_LIMIT:-0}
8+ memswap_limit : ${DOCKER_MEMSWAP_LIMIT:-0}
79 ports :
8- - " ${HOST_FASTAPI_PORT:-8080 }:${DEFAULT_FASTAPI_PORT:-2048}"
9- - " ${HOST_STREAM_PORT:-8081 }:${STREAM_PORT:-3120}"
10+ - " ${HOST_FASTAPI_PORT:-2048 }:${DEFAULT_FASTAPI_PORT:-2048}"
11+ - " ${HOST_STREAM_PORT:-3120 }:${STREAM_PORT:-3120}"
1012 volumes :
1113 # 挂载认证文件目录 (必需)
1214 - ../auth_profiles:/app/auth_profiles
You can’t perform that action at this time.
0 commit comments