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