Commit b7d86865 authored by Eteri's avatar Eteri Committed by Rafael Monnerat

caddy: add enable-quic option

parent 918fd21f
......@@ -2,6 +2,7 @@
extends =
../../component/golang/buildout.cfg
../../stack/slapos.cfg
../../component/dash/buildout.cfg
gowork.cfg
parts =
......@@ -34,7 +35,7 @@ mode = 0644
[template-caddy]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-caddy.cfg.in
md5sum = f87880908a33c03ba68f233cda6c6265
md5sum = b684a143d5620e8ed89744ec8c7f079e
output = ${buildout:directory}/instance-caddy.cfg.in
mode = 0644
......@@ -45,6 +46,13 @@ md5sum = b5794ac8b10ed90173ad566e6e324b35
output = ${buildout:directory}/index.html
mode = 0644
[template-caddy-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-caddy-service.sh.in
md5sum = d3562acaac05be570d28e37a0d889eec
output = ${buildout:directory}/template-caddy-service.sh.in
mode = 0644
[caddy]
recipe = slapos.recipe.cmmi
path = ${go_github.com_mholt_caddy:location}
......
......@@ -28,10 +28,17 @@ ca-dir = $${:srv}/ssl
# caddy service
#################################
[caddy-service]
recipe = slapos.cookbook:wrapper
command-line = ${caddy:output} -conf $${caddy-configuration:rendered}
wrapper-path = $${directory:service}/caddy
output = $${:wrapper-path}
recipe = slapos.recipe.template:jinja2
template = ${template-caddy-service:output}
rendered = $${directory:service}/caddy
mode = 0700
context =
key caddy_exec caddy-exec-dict:caddy-exec-file
section caddy_configuration_dict caddy-configuration
section parameter_dict slap-parameter
[caddy-exec-dict]
caddy-exec-file = ${caddy:output}
[caddy-configuration]
recipe = slapos.recipe.template:jinja2
......@@ -116,4 +123,5 @@ domain =
key-content =
cert-content =
caddy-ca-certificate =
port = 9443
\ No newline at end of file
port = 9443
enable-quic =
\ No newline at end of file
#!${dash-output:dash}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
{{ caddy_exec }} -conf {{caddy_configuration_dict['rendered']}}
{%- if parameter_dict['enable-quic'] != 'false' %}
-quic
{%- endif -%}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment