#!/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 export RAILS_ENV=development run_bundler --without=development bundle exec passenger start --runtime-check-only --runtime-dir=/var/lib/passenger 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 <