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/web

24 lines
617 B

9 years ago
#!/bin/bash -e
BIND="${BIND:=0.0.0.0}"
PORT="${PORT:=8080}"
RAILS_ENV="${RAILS_ENV:="development"}"
MIGRATE="${MIGRATE:="false"}"
MIN_INSTANCES="${PASSENGER_MIN_INSTANCES:=1}"
MAX_INSTANCES="${PASSENGER_MAX_INSTANCES:=3}"
SPAWN_METHOD="${PASSENGER_SPAWN_METHOD:=smart}"
if [ "$MIGRATE" = "true" ]; then
echo "Migrating database..."
bundle exec rake db:migrate
fi
exec bundle exec passenger start \
-p $PORT \
-a "${BIND}" \
--min-instances "$MIN_INSTANCES" \
--max-pool-size "$MAX_INSTANCES" \
--spawn-method "$SPAWN_METHOD" \
--nginx-config-template "docker/nginx.conf.erb" \
--max-preloader-idle-time 0