Merge branch 'shell_install_socket'

Conflicts:
	doc/install/installation.md
This commit is contained in:
Marin Jankovski 2014-09-22 15:33:07 +02:00
commit a04f0e5b3d
2 changed files with 10 additions and 4 deletions

View file

@ -32,6 +32,7 @@ v 7.3.0
- Zen mode (fullscreen) for issues/MR/notes (Robert Schilling) - Zen mode (fullscreen) for issues/MR/notes (Robert Schilling)
- Add ability to configure webhook timeout via gitlab.yml (Wes Gurney) - Add ability to configure webhook timeout via gitlab.yml (Wes Gurney)
- Sort project merge requests in asc or desc order for updated_at or created_at field (sponsored by O'Reilly Media) - Sort project merge requests in asc or desc order for updated_at or created_at field (sponsored by O'Reilly Media)
- Add Redis socket support to 'rake gitlab:shell:install'
v 7.2.1 v 7.2.1
- Delete orphaned labels during label migration (James Brooks) - Delete orphaned labels during label migration (James Brooks)

View file

@ -24,8 +24,6 @@ namespace :gitlab do
Dir.chdir(target_dir) do Dir.chdir(target_dir) do
sh "git fetch origin && git reset --hard $(git describe #{args.tag} || git describe origin/#{args.tag})" sh "git fetch origin && git reset --hard $(git describe #{args.tag} || git describe origin/#{args.tag})"
redis_url = URI.parse(ENV['REDIS_URL'] || "redis://localhost:6379")
config = { config = {
user: user, user: user,
gitlab_url: gitlab_url, gitlab_url: gitlab_url,
@ -34,14 +32,21 @@ namespace :gitlab do
auth_file: File.join(home_dir, ".ssh", "authorized_keys"), auth_file: File.join(home_dir, ".ssh", "authorized_keys"),
redis: { redis: {
bin: %x{which redis-cli}.chomp, bin: %x{which redis-cli}.chomp,
host: redis_url.host,
port: redis_url.port,
namespace: "resque:gitlab" namespace: "resque:gitlab"
}.stringify_keys, }.stringify_keys,
log_level: "INFO", log_level: "INFO",
audit_usernames: false audit_usernames: false
}.stringify_keys }.stringify_keys
redis_url = URI.parse(ENV['REDIS_URL'] || "redis://localhost:6379")
if redis_url.scheme == 'unix'
config['redis']['socket'] = redis_url.path
else
config['redis']['host'] = redis_url.host
config['redis']['port'] = redis_url.port
end
# Generate config.yml based on existing gitlab settings # Generate config.yml based on existing gitlab settings
File.open("config.yml", "w+") {|f| f.puts config.to_yaml} File.open("config.yml", "w+") {|f| f.puts config.to_yaml}