Skip to content

Instantly share code, notes, and snippets.

@argon
Created July 3, 2012 10:15
Show Gist options
  • Save argon/3038898 to your computer and use it in GitHub Desktop.
Save argon/3038898 to your computer and use it in GitHub Desktop.
GitLab systemd files
[Unit]
Description=Gitlab Resque
[Service]
Type=forking
SyslogIdentifier=gl-resque
User=gitlab
PIDFile=/home/gitlab/gitlab/tmp/pids/resque_worker.pid
WorkingDirectory=/home/gitlab/gitlab
ExecStart=/home/gitlab/gitlab/resque.sh
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -QUIT $MAINPID
[Install]
WantedBy=multi-user.target
[Unit]
Description=Gitlab Unicorn Rails server
[Service]
Type=forking
SyslogIdentifier=gl-unicorn
User=gitlab
PIDFile=/home/gitlab/gitlab/tmp/pids/unicorn.pid
WorkingDirectory=/home/gitlab/gitlab
ExecStart=/home/gitlab/gitlab/unicorn.sh
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -QUIT $MAINPID
[Install]
WantedBy=multi-user.target
#!/bin/sh
source $(/usr/local/rvm/bin/rvm 1.9.3 do rvm env --path)
mkdir -p tmp/pids
bundle exec rake environment resque:work QUEUE=post_receive,mailer RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid BACKGROUND=yes
#!/bin/sh
source $(/usr/local/rvm/bin/rvm 1.9.3 do rvm env --path)
DAEMON_OPTS="-c /home/gitlab/gitlab/config/unicorn.rb -E production -D"
bundle exec unicorn_rails $DAEMON_OPTS
@huanzhang
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment