Commit ee7823cb authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Rafael Monnerat

caddy-frontend: Add port-redirection config file generation

parent 1dad2597
......@@ -14,6 +14,7 @@ parts =
frontend-caddy-graceful
frontend-nginx-graceful
not-found-html
port-redirection
promise-frontend-caddy-configuration
promise-caddy-frontend-v4-https
promise-caddy-frontend-v4-http
......@@ -768,3 +769,13 @@ port = $${instance-parameter:configuration.plain_nginx_port}
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/is-process-older-than-dependency-set $${nginx-configuration:pid-file}
wrapper-path = $${directory:promise}/promise-nginx-is-process-older-than-dependency-set
[port-redirection]
<= jinja2-template-base
template = inline:
[{"srcPort": 80, "destPort": {{ http_port }}}, {"srcPort": 443, "destPort": {{ https_port }}}]
rendered = $${buildout:directory}/.slapos-port-redirect
mode = 0644
extra-context =
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
  • Attention! buildout.hash.cfg was not updated, I fixed it in f6e418a9, but please pay attention to this file during review.

    Or is it time to have some check that buildout.hash.cfg values are updated. But what to do with addition of files? Removal will be supported, as update-hash will fail.

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