Skip to content

Instantly share code, notes, and snippets.

@paulmooring
Created November 29, 2012 21:15
Show Gist options
  • Save paulmooring/4171971 to your computer and use it in GitHub Desktop.
Save paulmooring/4171971 to your computer and use it in GitHub Desktop.
APP_ROOT="/home/gitlab/gitlab"
DAEMON_OPTS="-c $APP_ROOT/config/unicorn.rb -E production"
PID_PATH="$APP_ROOT/tmp/pids"
UNICORN_PID="$PID_PATH/unicorn.pid"
RESQUE_PID="$PID_PATH/resque_worker.pid"
NAME="unicorn"
DESC="Gitlab service"
sudo -u gitlab -H sh -l -c "mkdir -p $PID_PATH && nohup bundle exec rake environment resque:work QUEUE=post_receive,mailer,system_hook RAILS_ENV=production PIDFILE=$RESQUE_PID"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment