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

caddy: add enable-quic option

parent 918fd21f
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = extends =
../../component/golang/buildout.cfg ../../component/golang/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/dash/buildout.cfg
gowork.cfg gowork.cfg
parts = parts =
...@@ -34,7 +35,7 @@ mode = 0644 ...@@ -34,7 +35,7 @@ mode = 0644
[template-caddy] [template-caddy]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-caddy.cfg.in url = ${:_profile_base_location_}/instance-caddy.cfg.in
md5sum = f87880908a33c03ba68f233cda6c6265 md5sum = b684a143d5620e8ed89744ec8c7f079e
output = ${buildout:directory}/instance-caddy.cfg.in output = ${buildout:directory}/instance-caddy.cfg.in
mode = 0644 mode = 0644
...@@ -45,6 +46,13 @@ md5sum = b5794ac8b10ed90173ad566e6e324b35 ...@@ -45,6 +46,13 @@ md5sum = b5794ac8b10ed90173ad566e6e324b35
output = ${buildout:directory}/index.html output = ${buildout:directory}/index.html
mode = 0644 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] [caddy]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
path = ${go_github.com_mholt_caddy:location} path = ${go_github.com_mholt_caddy:location}
......
...@@ -28,10 +28,17 @@ ca-dir = $${:srv}/ssl ...@@ -28,10 +28,17 @@ ca-dir = $${:srv}/ssl
# caddy service # caddy service
################################# #################################
[caddy-service] [caddy-service]
recipe = slapos.cookbook:wrapper recipe = slapos.recipe.template:jinja2
command-line = ${caddy:output} -conf $${caddy-configuration:rendered} template = ${template-caddy-service:output}
wrapper-path = $${directory:service}/caddy rendered = $${directory:service}/caddy
output = $${:wrapper-path} 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] [caddy-configuration]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -116,4 +123,5 @@ domain = ...@@ -116,4 +123,5 @@ domain =
key-content = key-content =
cert-content = cert-content =
caddy-ca-certificate = caddy-ca-certificate =
port = 9443 port = 9443
\ No newline at end of file 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