From 6d770df305f46c5d2286ce646ae48a8ab3800f5c Mon Sep 17 00:00:00 2001 From: IronicBadger Date: Tue, 9 Feb 2021 17:06:33 -0500 Subject: [PATCH] adds sysctl support --- templates/docker-compose.yml.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index 1db3124..48e425b 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -74,9 +74,6 @@ services: {% if container.mem_limit is defined %} mem_limit: {{ container.mem_limit }} {% endif %} -{% if container.restart is defined %} - restart: {{ container.restart }} -{% endif %} {% if container.command is defined %} command: {% for command in container.command %} @@ -89,6 +86,12 @@ services: - {{ sec_opt }} {% endfor %} {% endif %} +{% if container.sysctl is defined %} + sysctls: +{% for param in container.sysctl %} + - {{ param }} +{% endfor %} +{% endif %} {% if container.shm_size is defined %} shm_size: {{ container.shm_size }} {% endif %} @@ -98,5 +101,8 @@ services: - {{ dns_entry }} {% endfor %} {% endif %} +{% if container.restart is defined %} + restart: {{ container.restart }} +{% endif %} {% endif %} {% endfor %} \ No newline at end of file