Merge branch '19129-wb1-dashboard-speedup' refs #19129
[arvados.git] / tools / arvbox / lib / arvbox / docker / service / workbench2 / run-service
index f956eecc61b6118885fb78a8ae1cf1cadfdda0c6..5268c7e17e198866f29e1bf70afdca33131ea129 100755 (executable)
@@ -16,19 +16,21 @@ fi
 
 cd /usr/src/workbench2
 
-npm -d install --prefix /usr/local --global yarn@1.17.3
-
 yarn install
 
 if test "$1" = "--only-deps" ; then
     exit
 fi
 
+API_HOST=${localip}:${services[controller-ssl]}
+
+if test -f /usr/src/workbench2/public/API_HOST ; then
+    API_HOST=$(cat /usr/src/workbench2/public/API_HOST)
+fi
+
 cat <<EOF > /usr/src/workbench2/public/config.json
 {
-  "API_HOST": "${localip}:${services[controller-ssl]}",
-  "VOCABULARY_URL": "/vocabulary-example.json",
-  "FILE_VIEWERS_CONFIG_URL": "/file-viewers-example.json"
+  "API_HOST": "$API_HOST"
 }
 EOF
 
@@ -53,9 +55,12 @@ else
     arv api_client create --api-client "$apiclient"
 fi
 
-export HTTPS=false
 # Can't use "yarn start", need to run the dev server script
 # directly so that the TERM signal from "sv restart" gets to the
 # right process.
 export VERSION=$(./version-at-commit.sh)
-exec node node_modules/react-scripts-ts/scripts/start.js
+export BROWSER=none
+export CI=true
+export HTTPS=false
+node --version
+exec node node_modules/react-scripts/scripts/start.js