Commit 06d82ac0 authored by Jacob Vosmaer's avatar Jacob Vosmaer 💬

Spawn gitaly during bootstrap-rails

parent 73c7a51b
......@@ -161,7 +161,7 @@ gitaly/bin/gitaly: ${gitaly_clone_dir}/.git
# Set up supporting services
support-setup: .ruby-version foreman Procfile redis postgresql openssh-setup nginx-setup
support-setup: .ruby-version foreman Procfile redis gitaly-setup postgresql openssh-setup nginx-setup
@echo ""
@echo "*********************************************"
@echo "************** Setup finished! **************"
......
......@@ -70,6 +70,10 @@ thin() {
exec /usr/bin/env RAILS_ENV=development support/exec-cd gitlab bundle exec thin --socket=$(pwd)/gitlab.socket start
}
gitaly() {
foreman_start -c all=0,gitaly=1
}
all() {
print_port
foreman_start
......@@ -91,6 +95,9 @@ xgrafana)
xthin)
thin
;;
xgitaly)
gitaly
;;
x*)
all
;;
......
......@@ -2,7 +2,11 @@
success = true
begin
foreman_pid = spawn('./run', 'db')
foreman_pids = [
spawn('./run', 'db'),
spawn('./run', 'gitaly')
]
[
%w[bundle exec rake db:create],
%w[bundle exec rake dev:setup]
......@@ -10,10 +14,10 @@ begin
success &&= system({ 'force' => 'yes', 'BOOTSTRAP' => '1' }, *cmd, chdir: 'gitlab')
end
ensure
Process.kill('TERM', foreman_pid)
foreman_pids.each { |pid| Process.kill('TERM', pid) }
end
Process.wait(foreman_pid)
foreman_pids.each { |pid| Process.wait(pid) }
exit true if success
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment