Commit 7697db10 authored by eteri's avatar eteri

caddy: add port number in connection information

parent 4f851d0a
[$${caddy-configuration:ip}]:$${caddy-configuration:port}
[$${caddy-configuration:ipv6}]:$${caddy-configuration:port}
log $${caddy-configuration:access_log}
root $${directory:public-html}
\ No newline at end of file
root $${directory:public_html}
\ No newline at end of file
......@@ -2,6 +2,7 @@
parts =
caddy-service
caddy-configuration
public-html
publish-connection-information
......@@ -15,9 +16,11 @@ etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
public-html = $${buildout:directory}/public-html
service = $${:etc}/service
public_html = $${buildout:directory}/public_html
run = $${:var}/run
log = $${:var}/log
#www = $${:srv}/www
#ssl = $${:etc}/ssl
......@@ -27,22 +30,28 @@ log = $${:var}/log
[caddy-service]
recipe = slapos.recipe.template
url = ${template-caddy-service:output}
output = $${directory:srv}/caddy
output = $${directory:service}/caddy
mode = 0700
virtual-depends =
$${caddy-configuration:ip}
$${caddy-configuration:ipv6}
[caddy-configuration]
recipe = slapos.recipe.template
url = ${template-Caddyfile:output}
url = ${template-caddyfile:output}
output = $${directory:etc}/Caddyfile
mode = 0600
access_log = $${directory:log}/caddy-access.log
error_log = $${directory:log}/caddy-error.log
ip = $${slap-network-information:global-ipv6}
ipv6 = $${slap-network-information:global-ipv6}
local_ip = $${slap-network-information:local-ipv4}
port = 9443
[public-html]
recipe = slapos.recipe.template
url = ${template-public-html:output}
output = $${directory:public_html}/index.html
mode = 0600
[publish-connection-information]
recipe = slapos.cookbook:publish
url = $${caddy-configuration:ip}
\ No newline at end of file
url = http://[$${caddy-configuration:ipv6}]:$${caddy-configuration:port}
\ No newline at end of file
......@@ -28,25 +28,33 @@ bin = ${:directory}/bin
[template-caddy-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-caddy-service.sh.in
md5sum = 61da5aea191595962ab020b4197b5390
md5sum = 3723cc727fbbe28627a4cf8482f4dded
output = ${buildout:directory}/template-caddy-service.sh.in
mode = 0644
[template-Caddyfile]
[template-caddyfile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/Caddyfile.in
md5sum = c3ad1c9ea830dab84fa18bd58b5dc2ed
md5sum = 616f9c7cb788e1f1d7cee2093a7dc6ef
output = ${buildout:directory}/Caddyfile.in
mode = 0644
[template-caddy]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-caddy.cfg.in
md5sum = 3c9c4ef2963a57e5a68188f00a5938b9
md5sum = 42ec4ee2b67fe8aaa4db4be468624ea2
output = ${buildout:directory}/instance-caddy.cfg.in
mode = 0644
[template-public-html]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/index.html
md5sum = b5794ac8b10ed90173ad566e6e324b35
output = ${buildout:directory}/index.html
mode = 0644
[caddy]
recipe = slapos.recipe.cmmi
path = ${caddy-repository:location}
......@@ -57,4 +65,4 @@ make-binary = cd ${:path}/caddy && ${:go} install -v
environment =
PATH=${pkgconfig:location}/bin:${golang19:location}/bin:${buildout:bin-directory}:%(PATH)s
GOPATH=${gopath:directory}
path-to-bin = ${gopath:bin}/caddy
\ No newline at end of file
output = ${gopath:bin}/caddy
\ No newline at end of file
......@@ -2,5 +2,4 @@
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec ${caddy:path-to-bin}
-conf $${caddy-configuration:output}
\ No newline at end of file
exec ${caddy:output} -conf $${caddy-configuration:output}
\ 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