#!/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 RAILS_GROUPS=assets bundle exec rake npm:install if test "$1" = "--only-deps" ; then exit fi set -u if ! test -s /var/lib/arvados/workbench_secret_token ; then ruby -e 'puts rand(2**400).to_s(36)' > /var/lib/arvados/workbench_secret_token fi secret_token=$(cat /var/lib/arvados/workbench_secret_token) if ! test -s self-signed.key ; then openssl req -new -x509 -nodes -out self-signed.pem -keyout self-signed.key -days 365 -subj '/CN=localhost' fi cat >config/application.yml <