From 79d70906d52b31f0ccf6a117eb8ab5633f76dfad Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 3 May 2018 15:54:37 +0800 Subject: [PATCH] Fixed uninitialized env var RULES --- nginx.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index ec1a4df..c4ed9b7 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -1,5 +1,5 @@ {{/* Load the json that returns a list of rule names mapped to its respective filepath */}} -{{ $RULES := parseJson $.Env.RULES }} +{{ $RULES := parseJson ( or $.Env.RULES "[]" ) }} {{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}