#!/bin/bash # Copyright (C) The Arvados Authors. All rights reserved. # # SPDX-License-Identifier: AGPL-3.0 exec 2>&1 set -ex -o pipefail . /usr/local/lib/arvbox/common.sh cd /usr/src/arvados/apps/workbench if test -s /var/lib/arvados/workbench_rails_env ; then export RAILS_ENV=$(cat /var/lib/arvados/workbench_rails_env) else export RAILS_ENV=development fi run_bundler --without=development bundle exec passenger-config build-native-support bundle exec passenger-config install-standalone-runtime mkdir -p /usr/src/arvados/apps/workbench/tmp if test "$1" = "--only-deps" ; then # Workaround for validation that asserts there's a download URL # configured, which breaks rake if it is missing. cat >config/application.yml < /var/lib/arvados/workbench_secret_token fi secret_token=$(cat /var/lib/arvados/workbench_secret_token) if test -a /usr/src/arvados/apps/workbench/config/arvados_config.rb ; then rm -f config/application.yml else cat >config/application.yml <