feat: align with upstream 1.5.9.9
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
From 47d63a48b0d4e8d3f4001cabf4049d9b6ef1a13a Mon Sep 17 00:00:00 2001
|
||||
From: HenryDu8133 <813367384@qq.com>
|
||||
Date: Sun, 6 Sep 2026 09:41:34 +0800
|
||||
Subject: [PATCH 07/58] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Docker=20Comp?=
|
||||
=?UTF-8?q?ose=20v2=20=E4=B8=A5=E6=A0=BC=E7=B1=BB=E5=9E=8B=E4=B8=8B=20cpus?=
|
||||
=?UTF-8?q?=20=E5=8F=8C=E5=BC=95=E5=8F=B7=E5=AF=BC=E8=87=B4=20ParseFloat?=
|
||||
=?UTF-8?q?=20=E6=8A=A5=E9=94=99?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
docker-compose.yml | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/docker-compose.yml b/docker-compose.yml
|
||||
index f89810e..3eb9540 100644
|
||||
--- a/docker-compose.yml
|
||||
+++ b/docker-compose.yml
|
||||
@@ -55,16 +55,18 @@ services:
|
||||
# ===== 日志/性能 =====
|
||||
NODE_OPTIONS: ${NODE_OPTIONS:-"--max-old-space-size=768"}
|
||||
# 2C4G 机器的推荐配置(.env 可覆盖);小机器 1C2G 也能跑
|
||||
+ # ⚠️ 注意:cpus 默认值不能加双引号!新版 Docker Compose v2 严格类型:
|
||||
+ # 加引号会解析为字符串 '"1.5"' → ParseFloat 失败报错
|
||||
mem_limit: ${APP_MEM_LIMIT:-1400m}
|
||||
mem_reservation: ${APP_MEM_RESERVATION:-384m}
|
||||
- cpus: ${APP_CPUS:-"1.5"}
|
||||
+ cpus: ${APP_CPUS:-1.5}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
- cpus: ${APP_CPUS_LIMIT:-"2"}
|
||||
+ cpus: ${APP_CPUS_LIMIT:-2}
|
||||
memory: ${APP_MEM_LIMIT:-1400M}
|
||||
reservations:
|
||||
- cpus: ${APP_CPUS_RESERVATION:-"0.5"}
|
||||
+ cpus: ${APP_CPUS_RESERVATION:-0.5}
|
||||
memory: ${APP_MEM_RESERVATION:-384M}
|
||||
healthcheck:
|
||||
# 30s 后开始检查,每 15s 一次,连续 3 次失败就重启
|
||||
@@ -141,7 +143,7 @@ services:
|
||||
- redis-data:/data
|
||||
mem_limit: ${REDIS_MEM_LIMIT:-384m}
|
||||
mem_reservation: ${REDIS_MEM_RESERVATION:-64m}
|
||||
- cpus: ${REDIS_CPUS:-"0.5"}
|
||||
+ cpus: ${REDIS_CPUS:-0.5}
|
||||
networks:
|
||||
- voicehub-net
|
||||
|
||||
--
|
||||
2.45.1.windows.1
|
||||
|
||||
Reference in New Issue
Block a user