diff --git a/app/components.js b/app/components.js index c48a93c9b6fa665e806431b7907e24393f3641f3..77d1278203a3525698183c81d91609eaefaeb228 100644 --- a/app/components.js +++ b/app/components.js @@ -14,12 +14,11 @@ const yaml = require('js-yaml') var baseRepl = { baseDir: baseDir, - baseUri: config.app.baseUri, - baseUriPath: url.parse(config.app.baseUri).path + prefix: config.k8component.image.prefix }; -// ensure that baseUriPath does not end with / -if (baseRepl.baseUriPath.endsWith('/')) - baseRepl.baseUriPath = baseRepl.baseUriPath.slice(0, baseRepl.baseUriPath.length -1) +// ensure that prefix does not end with / +if (baseRepl.prefix.endsWith('/')) + baseRepl.prefix = baseRepl.prefix.slice(0, baseRepl.prefix.length -1) const br = config.app.baseReplacements for (k in br) baseRepl[k] = br[k]; diff --git a/config/analytics-toolkit.hjson b/config/analytics-toolkit.hjson index 72fc90f8c9bf72964ba5468fcc2239e5e9090bb1..d0f919cd9b82c5c907123020843a7003d6cd1df6 100644 --- a/config/analytics-toolkit.hjson +++ b/config/analytics-toolkit.hjson @@ -26,4 +26,10 @@ port: 6390, host: 'analytics-toolkit.nomad-coe.eu' } + k8component: { + entryPoint: { + path: "/notebook-edit/*" + pathReStr: "/notebook-edit(/[^?#]*)(\\?[^#]*)?(#.*)?$" + } + } } diff --git a/config/default-beaker.hjson b/config/default-beaker.hjson index 410dd7ffc39c2c83a569492d885ac3dfd548b16a..7d4b3e774db3eaf6e7a6f24f30be923fddd7fc80 100644 --- a/config/default-beaker.hjson +++ b/config/default-beaker.hjson @@ -12,9 +12,7 @@ k8component: { liveDelay: 15 } entryPoint: { - path: "/notebook-edit/*" - pathReStr: "/notebook-edit(/[^?#]*)(\\?[^#]*)?(#.*)?$" - redirectTarget: "{{baseUri}}/beaker/#/open?uri={{escapedPath1}}" + redirectTarget: "{{prefix}}/#/open?uri={{escapedPath1}}" execCommand: [] exclusiveStartPoint: false } diff --git a/config/default-jupyter.hjson b/config/default-jupyter.hjson index da8bef72ec67a26568c24aa4a9f1db43379979ad..ed9405669f67877f852080b80695cbdb782dc13b 100644 --- a/config/default-jupyter.hjson +++ b/config/default-jupyter.hjson @@ -8,7 +8,6 @@ k8component: { image: "analytics-toolkit.nomad-coe.eu:5509/nomadlab/jupyter-image:0.999" port: 8888, prefix: "/jupyter", - homePath: "/home/beaker" healthPath: "/jupyter" healthDelay: 2 healthPeriod: 10 @@ -19,7 +18,7 @@ k8component: { "entryPoint": { "path": "/jupyter/entrypoint" "uriRe": "/jupyter(/.*)", - "redirectTarget": "{{baseUri}}/jupyter/tree?", + "redirectTarget": "{{prefix}}/tree?", "exclusiveStartPoint": false }, } diff --git a/config/default.hjson b/config/default.hjson index 5c3a7e2f2ae721a2c84dd4a66b2d3f1b16ca50a9..c135c41e0c8d5a8ccf88f9413987ffcd6fe4a541 100644 --- a/config/default.hjson +++ b/config/default.hjson @@ -9,7 +9,6 @@ app: { resolveCacheNMax: 30000 pageReloadTime: 5 frontendAddr: "http://127.0.0.1:4200" - baseUri: "http://127.0.0.1" catchErrors: false templatesDir: "{{baseDir}}/templates" baseReplacements: { @@ -71,14 +70,14 @@ k8component: { checksumSkipReStr: "^(?:path[0-9]*|escapedPath[0-9]*)$" } entryPoint: { - path: "/notebook-edit/*" - pathReStr: "/notebook-edit(/[^?#]*)(\\?[^#]*)?(#.*)?$" - redirectTarget: "{{baseUri}}/beaker/#/open?uri={{escapedPath1}}" + path: "{{commands}}/start/*" + pathReStr: "/start(/[^?#]*)(\\?[^#]*)?(#.*)?$" + redirectTarget: "{{prefix}}/" execCommand: [] exclusiveStartPoint: false } commands: { - path: "{{baseUriPath}}/cM" + path: "{{prefix}}/cM" } } userInfo: {