Add gitlab 8.3.2
This commit is contained in:
10
www-apps/gitlabhq/files/config.ssh
Normal file
10
www-apps/gitlabhq/files/config.ssh
Normal file
@@ -0,0 +1,10 @@
|
||||
Host localhost
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile=/dev/null
|
||||
BatchMode yes
|
||||
CheckHostIP no
|
||||
AddressFamily inet
|
||||
PreferredAuthentications publickey
|
||||
ControlMaster auto
|
||||
ControlPath ~/.ssh/ssh-%r-%h:%p.sock
|
||||
ControlPersist 24h
|
||||
10
www-apps/gitlabhq/files/gitlab.logrotate
Normal file
10
www-apps/gitlabhq/files/gitlab.logrotate
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
@LOG_DIR@/*.log {
|
||||
missingok
|
||||
delaycompress
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- lib/tasks/gitlab/check.rake.orig 2015-11-13 16:46:18.044125564 +0100
|
||||
+++ lib/tasks/gitlab/check.rake 2015-11-13 16:46:24.414126919 +0100
|
||||
@@ -24,8 +24,6 @@
|
||||
check_log_writable
|
||||
check_tmp_writable
|
||||
check_uploads
|
||||
- check_init_script_exists
|
||||
- check_init_script_up_to_date
|
||||
check_projects_have_namespace
|
||||
check_redis_version
|
||||
check_ruby_version
|
||||
89
www-apps/gitlabhq/files/gitlabhq-8.3.2.init
Normal file
89
www-apps/gitlabhq/files/gitlabhq-8.3.2.init
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
name="GitLab"
|
||||
description="GitLab 8.3 on Unicorns"
|
||||
|
||||
: ${gitlab_user:=git}
|
||||
: ${gitlab_group:=git}
|
||||
: ${gitlab_home:="/opt/gitlabhq-8.3"}
|
||||
: ${gitlab_log:="/var/log/gitlabhq-8.3"}
|
||||
|
||||
: ${unicorn_pidfile:="${gitlab_home}/tmp/pids/unicorn.pid"}
|
||||
: ${unicorn_log:="${gitlab_log}/unicorn.log"}
|
||||
|
||||
: ${sidekiq_pidfile:="${gitlab_home}/tmp/pids/sidekiq.pid"}
|
||||
: ${sidekiq_log:="${gitlab_log}/sidekiq.log"}
|
||||
|
||||
: ${workhorse_pidfile:="${gitlab_home}/tmp/pids/workhorse.pid"}
|
||||
: ${workhorse_log:="${gitlab_log}/workhorse.log"}
|
||||
: ${workhorse_socket:="${gitlab_home}/tmp/sockets/gitlab-workhorse.socket"}
|
||||
|
||||
: ${rails_env:=production}
|
||||
|
||||
unicorn_command="/usr/bin/bundle"
|
||||
unicorn_command_args="exec unicorn_rails -c ${gitlab_home}/config/unicorn.rb -E ${rails_env} -D"
|
||||
sidekiq_command="/usr/bin/bundle"
|
||||
sidekiq_start_command_args="exec sidekiq -c 10 -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q incoming_email -q runner -q common -q default -e ${rails_env} -d -P ${sidekiq_pidfile} -L ${sidekiq_log} $@ >> ${sidekiq_log} 2>&1"
|
||||
sidekiq_stop_command_args="exec sidekiqctl stop ${sidekiq_pidfile} >> ${sidekiq_log}"
|
||||
workhorse_command="/usr/bin/gitlab-workhorse"
|
||||
workhorse_command_args="-listenUmask 0 -listenNetwork unix -listenAddr ${workhorse_socket} -authBackend http://127.0.0.1:8080"
|
||||
|
||||
if [ ${rails_env} = development ]; then
|
||||
sidekiq_command_args+=" VVERBOSE=1"
|
||||
fi
|
||||
|
||||
depend() {
|
||||
provide gitlab
|
||||
need redis
|
||||
use net mysql postgresql
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${unicorn_pidfile}")"
|
||||
checkpath -d -o "${gitlab_user}:${gitlab_group}" -m750 "$(dirname "${sidekiq_pidfile}")"
|
||||
|
||||
ebegin "Starting GitLab 8.3 Unicorn servers"
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${unicorn_pidfile}" \
|
||||
--exec ${unicorn_command} -- ${unicorn_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab 8.3 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_start_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Starting GitLab 8.3 Workhorse"
|
||||
start-stop-daemon --start \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${workhorse_pidfile}" \
|
||||
--background -1 "${workhorse_log}" -2 "${workhorse_log}" \
|
||||
--exec ${workhorse_command} -- ${workhorse_command_args}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
ebegin "Stopping GitLab 8.3 Workhorse"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${workhorse_pidfile}"
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab 8.3 Sidekiq"
|
||||
cd "${gitlab_home}"
|
||||
sudo -u git -H ${sidekiq_command} ${sidekiq_stop_command_args}
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping GitLab 8.3 Unicorn servers"
|
||||
start-stop-daemon --stop \
|
||||
--chdir "${gitlab_home}" \
|
||||
--user="${gitlab_user}:${gitlab_group}" \
|
||||
--pidfile="${unicorn_pidfile}"
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user