2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
9 . /usr/local/lib/arvbox/common.sh
11 cd /usr/src/arvados/services/api
13 if test -s /var/lib/arvados/api_rails_env ; then
14 export RAILS_ENV=$(cat /var/lib/arvados/api_rails_env)
16 export RAILS_ENV=development
19 run_bundler --without=development
20 bundle exec passenger-config build-native-support
21 bundle exec passenger-config install-standalone-runtime
23 if test "$1" = "--only-deps" ; then
27 flock /var/lib/arvados/api.lock /usr/local/lib/arvbox/api-setup.sh
30 if test "$1" = "--only-setup" ; then
34 exec bundle exec passenger start --port=${services[api]}