From abad2c4c044d68089c79ea249096f53c92234af4 Mon Sep 17 00:00:00 2001 From: IronicBadger Date: Wed, 4 May 2022 10:06:34 -0400 Subject: [PATCH] ulimits implementation --- templates/docker-compose.yml.j2 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 6c867cc..872396c 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -105,9 +105,16 @@ services: shm_size: {{ container.shm_size }} {% endif %} {% if container.ulimits is defined %} - nofile: - soft: {{ container.ulimits_soft }} - hard: {{ container.ulimits_hard }} + ulimits: +{% if container.ulimits.nproc is defined %} + nproc: {{ container.ulimits.nproc }} +{% endif %} +{% if container.ulimits.nofile is defined %} + nofile: +{% for param, value in container.ulimits.nofile.items() %} + {{ param }}: {{ value }} +{% endfor %} +{% endif %} {% endif %} {% if container.dns is defined %} dns: