Skip to content

Commit 3732209

Browse files
committed
docker-compose.yml文件部分默认参数调整
1 parent 8681b7b commit 3732209

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

docker/.env.docker

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ USERSCRIPT_PATH=browser_utils/more_modles.js
118118
# Docker 特定配置
119119
# =============================================================================
120120

121-
# 容器资源限制 (可选)
121+
# 容器内存限制
122122
# 默认不限制。如需限制容器资源,请在你的 .env 文件中取消注释并设置以下值。
123-
# 例如: DOCKER_MEMORY_LIMIT=4g
123+
# 例如: DOCKER_MEMORY_LIMIT=1g或DOCKER_MEMORY_LIMIT=1024m
124+
# 注意:DOCKER_MEMORY_LIMIT和DOCKER_MEMSWAP_LIMIT相同时,不会使用SWAP
124125
# DOCKER_MEMORY_LIMIT=
125126
# DOCKER_MEMSWAP_LIMIT=
126127

docker/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ services:
44
context: ..
55
dockerfile: docker/Dockerfile
66
container_name: ai-studio-proxy-container
7-
mem_limit: ${DOCKER_MEMORY_LIMIT}
8-
memswap_limit: ${DOCKER_MEMSWAP_LIMIT}
7+
mem_limit: ${DOCKER_MEMORY_LIMIT:-0}
8+
memswap_limit: ${DOCKER_MEMSWAP_LIMIT:-0}
99
ports:
10-
- "${HOST_FASTAPI_PORT:-8080}:${DEFAULT_FASTAPI_PORT:-2048}"
11-
- "${HOST_STREAM_PORT:-8081}:${STREAM_PORT:-3120}"
10+
- "${HOST_FASTAPI_PORT:-2048}:${DEFAULT_FASTAPI_PORT:-2048}"
11+
- "${HOST_STREAM_PORT:-3120}:${STREAM_PORT:-3120}"
1212
volumes:
1313
# 挂载认证文件目录 (必需)
1414
- ../auth_profiles:/app/auth_profiles

0 commit comments

Comments
 (0)