-
-
Save pedrolopez/f1ade49dca7914ae809e to your computer and use it in GitHub Desktop.
Upstart job configuration files (aka runscripts) for GitLab CE.
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
#!upstart | |
description "GitLab (Sidekiq)" | |
author "Jakub Jirutka" | |
start on starting gitlab | |
stop on stopping gitlab | |
env sidekiq_logfile="/var/log/gitlab/sidekiq.log" | |
env sidekiq_queues="-q post_receive -q mailer -q system_hook | |
-q project_web_hook -q gitlab_shell -q common -q default" | |
setuid git | |
chdir /opt/gitlab | |
exec /usr/local/bin/bundle exec sidekiq -L $sidekiq_logfile -e production $sidekiq_queues |
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
#!upstart | |
description "GitLab (web)" | |
author "Jakub Jirutka" | |
start on starting gitlab and started gitlab-sidekiq | |
stop on stopping gitlab and stopping gitlab-sidekiq | |
env unicorn_config="/opt/gitlab/config/unicorn.rb" | |
reload signal USR1 | |
setuid git | |
chdir /opt/gitlab | |
exec /usr/local/bin/bundle exec unicorn_rails -c $unicorn_config -E production |
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
#!upstart | |
description "GitLab" | |
author "Jakub Jirutka" | |
# postgresql is not an upstart service, so we can't depend on it :( | |
start on filesystem and started redis-server | |
stop on runlevel [016] | |
pre-start script | |
# Prepare directory for the socket. | |
mkdir -p -m 755 /run/gitlab | |
chown git /run/gitlab | |
end script |
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
#!upstart | |
description "Redis server" | |
author "Jakub Jirutka" | |
start on filesystem | |
stop on runlevel [016] | |
env redis_conf="/etc/redis/redis.conf" | |
env socket_dir="/run/redis" | |
expect fork | |
pre-start script | |
mkdir -p -m 755 $socket_dir | |
chown redis:redis $socket_dir | |
end script | |
exec start-stop-daemon \ | |
--start \ | |
--chuid redis:redis \ | |
--umask 007 \ | |
--exec /usr/bin/redis-server $redis_conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment