Commit 3832676c authored by Alain Takoudjou's avatar Alain Takoudjou

slaprunner: make sure custom frontend-url is published

parent 05bdceb9
......@@ -18,7 +18,7 @@ md5sum = 713db528880282d568278f09458d2aab
[template-runner]
filename = instance-runner.cfg
md5sum = cefbc8abef234c9a74f88688a0ac0030
md5sum = e12255a8c946b3eb8c6373fff481339f
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......
......@@ -86,8 +86,24 @@ check-secure = 1
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[custom-frontend-url-ready-promise]
recipe = slapos.recipe.template:jinja2
path = $${directory:promises}/custom_frontend_ready_promise
url = https://$${request-custom-frontend:connection-domain}
rendered = $${directory:promises}/custom_frontend_ready_promise
template = inline:
#!{{ dash_executable_location }}
URL="$${:url}"
CODE=$({{ curl_executable_location }} -g -k -sL $URL -w %{http_code} --max-time 5 -o /dev/null)
if [ $? -eq 3 ]; then
echo "Custom frontend URL malformed: $URL." >&2
exit 1
fi
[publish-connection-information]
custom-frontend-url = https://$${request-custom-frontend:connection-domain}
custom-frontend-url = $${custom-frontend-url-ready-promise:url}
{% endif %}
# Create all needed directories
......
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