为容器增加限制

This commit is contained in:
leo
2023-12-31 18:15:28 +08:00
parent 6b7bef0861
commit 44ef312811
2 changed files with 12 additions and 1 deletions

View File

@@ -3,5 +3,15 @@ version: "3"
services:
build_self:
build: .
container_name: build_self
ports:
- "5001:80"
- "5001:80"
storage_opt:
size: 50M
cpus: 0.5
deploy:
resources:
limits:
memory: 100M
reservations:
memory: 100M