OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/docker/prod/web

24 lines
735 B

9 years ago
#!/bin/bash -e
BIND="${BIND:=0.0.0.0}"
PORT="${PORT:=8080}"
RAILS_ENV="${RAILS_ENV:="development"}"
MIGRATE="${MIGRATE:="false"}"
if [ "$RAILS_ENV" = "production" ] ; then
# @TODO Add apache config to serve the assets. Until then we have Puma serve
# them which is slower. This is ok if an asset host is used (SaaS).
# But for self-hosted installations we may want to fix that.
export OPENPROJECT_ENABLE__INTERNAL__ASSETS__SERVER=true
fi
9 years ago
if [ "$MIGRATE" = "true" ]; then
echo "Migrating database..."
bundle exec rake db:migrate
else
$APP_PATH/docker/prod/migration_status # abort if there are pending migrations
9 years ago
fi
# see `config/puma.rb` for configuration
exec bundle exec rails server -u puma -b $BIND -p $PORT