#!/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/services/api if test -s $ARVADOS_CONTAINER_PATH/api_rails_env ; then export RAILS_ENV=$(cat $ARVADOS_CONTAINER_PATH/api_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 if test "$1" = "--only-deps" ; then exit fi flock $ARVADOS_CONTAINER_PATH/api.lock /usr/local/lib/arvbox/api-setup.sh set +u if test "$1" = "--only-setup" ; then exit fi exec bundle exec passenger start --port=${services[api]}