Skip to content

Commit

Permalink
Modify raw config option in caddy to be set as a list of lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bestlibre committed Feb 6, 2018
1 parent a6da281 commit f87e2ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions caddy_proxy/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
"vhosts": [
{"vhost": "str",
"remote": "str?",
"port": "str"
"port": "str",
"directory": "str?"
}
],
"email": "email",
"disable_http_chalenge": "bool?",
"raw_config": "str?",
"raw_config": [{"line": "str"}],
"homeassistant": "str?"
},
"ports": {"80/tcp": 80, "443/tcp": 443},
Expand Down
1 change: 0 additions & 1 deletion caddy_proxy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ then
fi

mustache-cli /data/options.json /templates/vhost.mustache >> /tmp/caddy.conf
echo $(jq -r '.raw_config // empty' /data/options.json) >> /tmp/caddy.conf

mkdir -p /ssl/caddy
export CADDYPATH=/ssl/caddy
Expand Down
3 changes: 3 additions & 0 deletions caddy_proxy/vhost.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
errors stdout
}
{{/vhosts}}
{{#raw_config}}
{{line}}
{{/raw_config}}

0 comments on commit f87e2ad

Please sign in to comment.