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 |
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just did it myself and got nearly the same files like you. I added nginx.service to the wants of gitlab.service.
Furthermore I use unicorn_rails in daemon-mode (-D) and used the service type fork. What's the difference?
Thanks for providing your files! I'm working on a setup based on opensuse 12.1/12.2 64bit.