mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 23:15:47 +00:00
Add widgets link in nginx configuration
This commit is contained in:
parent
7bd5fdad59
commit
5e68f053a0
@ -55,6 +55,12 @@ server {
|
|||||||
rewrite /files/(.*) /$1 break;
|
rewrite /files/(.*) /$1 break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /widgets {
|
||||||
|
alias /usr/share/nginx/widgets;
|
||||||
|
try_files $uri $uri/ /widgets/index.html;
|
||||||
|
add_header Content-Security-Policy "frame-ancestors *";
|
||||||
|
}
|
||||||
|
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
location = /40x.html {
|
location = /40x.html {
|
||||||
}
|
}
|
||||||
|
@ -47,19 +47,19 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create an empty configuration json
|
# Create an empty configuration json
|
||||||
echo "{}" > configuration.json
|
echo "{}" > /tmp/configuration.json
|
||||||
|
|
||||||
# Copy the external configuration file if it exists
|
# Copy the external configuration file if it exists
|
||||||
if test -f "/mnt/external_files/configs/configuration.json"; then
|
if test -f "/mnt/external_files/configs/configuration.json"; then
|
||||||
echo "Copying external configuration"
|
echo "Copying external configuration"
|
||||||
cp /mnt/external_files/configs/configuration.json configuration.json
|
cp /mnt/external_files/configs/configuration.json /tmp/configuration.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update from env variables
|
# Update from env variables
|
||||||
echo "Updating configuration from env"
|
echo "Updating configuration from env"
|
||||||
/opt/clearml/utilities/update_from_env.py \
|
/opt/clearml/utilities/update_from_env.py \
|
||||||
--verbose \
|
--verbose \
|
||||||
configuration.json \
|
/tmp/configuration.json \
|
||||||
/usr/share/nginx/html/configuration.json
|
/usr/share/nginx/html/configuration.json
|
||||||
|
|
||||||
export NGINX_APISERVER_ADDR=${NGINX_APISERVER_ADDRESS:-http://apiserver:8008}
|
export NGINX_APISERVER_ADDR=${NGINX_APISERVER_ADDRESS:-http://apiserver:8008}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
Loading…
Reference in New Issue
Block a user