docker-compose增加内存限制配置

This commit is contained in:
jianzhichu
2026-01-01 22:26:44 +08:00
parent 0532ef1006
commit 66718ff478
4 changed files with 182 additions and 75 deletions
+4
View File
@@ -151,6 +151,10 @@ services:
- 8.8.8.8 # Google DNS(提升海外访问稳定性)
- 114.114.114.114 # 国内DNS(提升国内访问稳定性)
- 223.5.5.5 # 阿里云DNS(备用)
deploy:
resources:
limits:
memory: 120m #限制内存占用不超过120mb,如果运行过程中报错,可以再增加点。不做限制会涨到300多
```