增加服务器资源约束配置。

This commit is contained in:
JunzhouLiu
2020-12-14 15:31:35 +08:00
parent fce2f02bfc
commit d6ecc45998
6 changed files with 32 additions and 2 deletions

View File

@ -2,6 +2,12 @@ version: "3"
services:
jd_scripts1: #默认
image: akyakya/jd_scripts
# 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2单核的20%
# deploy:
# resources:
# limits:
# cpus: '0.2'
# memory: 200M
restart: always
container_name: jd_scripts1
tty: true