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

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

View File

@ -1,5 +1,11 @@
jd_scripts:
image: akyakya/jd_scripts
# 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2单核的20%
# deploy:
# resources:
# limits:
# cpus: '0.2'
# memory: 200M
container_name: jd_scripts
restart: always
volumes: