2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
9 . /usr/local/lib/arvbox/common.sh
11 if test "$1" != "--only-deps" ; then
12 while [ ! -f $ARVADOS_CONTAINER_PATH/api.ready ]; do
17 cd /usr/src/arvados/apps/workbench
19 if test -s $ARVADOS_CONTAINER_PATH/workbench_rails_env ; then
20 export RAILS_ENV=$(cat $ARVADOS_CONTAINER_PATH/workbench_rails_env)
22 export RAILS_ENV=development
25 run_bundler --without=development --binstubs=binstubs
26 binstubs/passenger-config build-native-support
27 binstubs/passenger-config install-standalone-runtime
28 mkdir -p /usr/src/arvados/apps/workbench/tmp
30 if test "$1" = "--only-deps" ; then
31 # Workaround for validation that asserts there's a download URL
32 # configured, which breaks rake if it is missing.
33 cat >config/application.yml <<EOF
35 keep_web_url: https://example.com/c=%{uuid_or_pdh}
37 RAILS_GROUPS=assets flock $GEMLOCK bin/bundle exec rake npm:install
38 rm config/application.yml
44 secret_token=$(cat $ARVADOS_CONTAINER_PATH/workbench_secret_token)
46 RAILS_GROUPS=assets flock $GEMLOCK bin/bundle exec rake npm:install
47 flock $GEMLOCK bin/bundle exec rake assets:precompile