From 4642c4a72b18708d93e414b25c69defaed8bc9bf Mon Sep 17 00:00:00 2001 From: Corbin Bartsch Date: Sat, 28 Oct 2023 21:02:50 -0400 Subject: [PATCH] escape test with quotes, make interval and timeout optional --- templates/docker-compose.yml.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index b134ada..47ff813 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -161,9 +161,13 @@ services: {% endif %} {% if container.healthcheck is defined %} healthcheck: - test: {{ container.healthcheck.test }} + test: "{{ container.healthcheck.test }}" +{% if container.healthcheck.interval is defined %} interval: {{ container.healthcheck.interval }} +{% endif %} +{% if container.healthcheck.timeout is defined %} timeout: {{ container.healthcheck.timeout }} +{% endif %} {% if container.healthcheck.retries is defined %} retries: {{ container.healthcheck.retries }} {% endif %}