14660: Add workbench2 to arvbox. Improve SSL support in arvbox.
[arvados.git] / tools / arvbox / lib / arvbox / docker / service / workbench2 / run-service
1 #!/bin/bash
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 exec 2>&1
7 set -ex -o pipefail
8
9 .  /usr/local/lib/arvbox/common.sh
10
11 cd /usr/src/workbench2
12
13 npm -d install --prefix /usr/local --global yarn
14
15 yarn install
16
17 if test "$1" = "--only-deps" ; then
18     exit
19 fi
20
21 echo "{\"API_HOST\": \"${localip}:${services[controller-ssl]}\"}" > /usr/src/workbench2/public/config.json
22 export HTTPS=false
23 exec yarn start