Fix handling of the subpaths with nginx templating (#204)

Co-authored-by: ogirardot <olivier.girardot@malt.com>
This commit is contained in:
Olivier Girardot 2023-07-02 15:12:29 +02:00 committed by GitHub
parent 452f606889
commit a7ed46979f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,7 @@ EOF
envsubst '${COMMENT_IPV6_LISTEN} ${NGINX_APISERVER_ADDR} ${NGINX_FILESERVER_ADDR}' < /etc/nginx/clearml.conf.template > /etc/nginx/sites-enabled/default
if [[ -n "${CLEARML_SERVER_SUB_PATH}" ]]; then
mkdir -p /etc/nginx/default.d/
envsubst '${CLEARML_SERVER_SUB_PATH}' < /etc/nginx/clearml_subpath.conf.template > /etc/nginx/default.d/clearml_subpath.conf
cp /usr/share/nginx/html/env.js /usr/share/nginx/html/env.js.origin
envsubst '${CLEARML_SERVER_SUB_PATH}' < /usr/share/nginx/html/env.js.origin > /usr/share/nginx/html/env.js