Moved from thin to puma.

This commit is contained in:
Martin Edenhofer 2014-03-09 14:52:26 +01:00
parent 65078e85fe
commit 11c1d0002f

View file

@ -38,13 +38,13 @@ else
exit 1 exit 1
fi fi
rvm use ruby-1.9.3 rvm use ruby-2.0.0
RUBY=$(which ruby) RUBY=$(which ruby)
RAILS=$(which rails) RAILS=$(which rails)
BUNDLE=$(which bundle) BUNDLE=$(which bundle)
APP_PIDFILE=$DAEMON_HOME/tmp/pids/thin.pid APP_PIDFILE=$DAEMON_HOME/tmp/pids/puma.pid
WS_PIDFILE=$DAEMON_HOME/tmp/pids/websocket.pid WS_PIDFILE=$DAEMON_HOME/tmp/pids/websocket.pid
SCHEDULER_PIDFILE=$DAEMON_HOME/tmp/pids/scheduler_runner.pid SCHEDULER_PIDFILE=$DAEMON_HOME/tmp/pids/scheduler_runner.pid
@ -62,7 +62,8 @@ start() {
# start web server # start web server
echo -n $"Starting ${NAME}/${RAILS_ENV} application server on port: ${APP_PORT}" echo -n $"Starting ${NAME}/${RAILS_ENV} application server on port: ${APP_PORT}"
# $RAILS server -d -p $APP_PORT --pid $APP_PIDFILE &> /dev/null # $RAILS server -d -p $APP_PORT --pid $APP_PIDFILE &> /dev/null
thin start --threaded -d -p $APP_PORT --pid $APP_PIDFILE # thin start --threaded -d -p $APP_PORT --pid $APP_PIDFILE
pumactl start --pidfile $APP_PIDFILE -d -p $APP_PORT -e $RAILS_ENV
sleep 2 sleep 2
status -p $APP_PIDFILE &> /dev/null && echo_success || echo_failure status -p $APP_PIDFILE &> /dev/null && echo_success || echo_failure
echo echo