Last active
December 14, 2015 16:29
-
-
Save veprbl/5115638 to your computer and use it in GitHub Desktop.
GitLab systemd unit
https://github.com/gitlabhq/gitlab-recipes/issues/14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Gitlab Resque Worker | |
Requires=redis.service | |
After=redis.service | |
Wants=postfix.service mysqld.service | |
[Service] | |
Type=forking | |
User=git | |
WorkingDirectory=/home/git/gitlab | |
ExecStart=/bin/sh -c "RAILS_ENV=production bundle exec rake sidekiq:start" | |
ExecStopPost=/bin/sh -c "RAILS_ENV=production bundle exec rake sidekiq:stop" | |
PIDFile=/home/git/gitlab/tmp/pids/sidekiq.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Self Hosted Git Management | |
Requires=mysqld.service redis.service | |
After=mysqld.service redis.service | |
Wants=postfix.service gitlab-worker.service | |
[Service] | |
Type=simple | |
User=git | |
WorkingDirectory=/home/git/gitlab | |
ExecStart=/bin/sh -c "bundle exec unicorn_rails -c /home/git/gitlab/config/unicorn.rb -E production" | |
PIDFile=/home/git/gitlab/tmp/pids/unicorn.pid | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure about daemon-mode. I think it doesn't matter when PIDFile parameter is specified.
I personally use these units on my ArchLinux/i686 and ArchLinuxArm setups.