Skip to content
Snippets Groups Projects
Commit 1d543e64 authored by randx's avatar randx
Browse files

Finished with configs

parent 9b337b83
No related branches found
No related tags found
No related merge requests found
Loading
@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
Loading
@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
   
   
def new def new
@admin_user = User.new(:projects_limit => GITLAB_OPTS["default_projects_limit"]) @admin_user = User.new(:projects_limit => Gitlab.config.default_projects_limit)
end end
   
def edit def edit
Loading
Loading
Loading
@@ -2,6 +2,10 @@
Loading
@@ -2,6 +2,10 @@
# Gitlab application config file # # Gitlab application config file #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
   
#
# 1. Common settings
# ==========================
# Web application specific settings # Web application specific settings
web: web:
host: localhost host: localhost
Loading
@@ -13,11 +17,21 @@ web:
Loading
@@ -13,11 +17,21 @@ web:
email: email:
from: notify@localhost from: notify@localhost
   
# Application specific settings
# Like default project limit for user etc
app:
default_projects_limit: 10
#
# 2. Advanced settings:
# ==========================
# Git Hosting configuration # Git Hosting configuration
git_host: git_host:
admin_uri: git@localhost:gitolite-admin admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/ base_path: /home/git/repositories/
host: localhost # host: localhost
git_user: git git_user: git
upload_pack: true upload_pack: true
receive_pack: true receive_pack: true
Loading
@@ -33,7 +47,3 @@ git:
Loading
@@ -33,7 +47,3 @@ git:
git_max_size: 5242880 # 5.megabytes git_max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds # Git timeout to read commit, in seconds
git_timeout: 10 git_timeout: 10
# Gitlab settings
gitlab:
default_projects_limit: 10
Loading
@@ -33,7 +33,7 @@ class Settings < Settingslogic
Loading
@@ -33,7 +33,7 @@ class Settings < Settingslogic
end end
   
def ssh_host def ssh_host
git_host['host'] || 'localhost' git_host['host'] || web_host || 'localhost'
end end
   
def ssh_path def ssh_path
Loading
@@ -49,11 +49,19 @@ class Settings < Settingslogic
Loading
@@ -49,11 +49,19 @@ class Settings < Settingslogic
end end
   
def git_upload_pack def git_upload_pack
git_host['upload_pack'] || true if git_host['upload_pack'] == false
false
else
true
end
end end
   
def git_receive_pack def git_receive_pack
git_host['receive_pack'] || true if git_host['receive_pack'] == false
false
else
true
end
end end
   
def git_bin_path def git_bin_path
Loading
@@ -71,5 +79,9 @@ class Settings < Settingslogic
Loading
@@ -71,5 +79,9 @@ class Settings < Settingslogic
def gitolite_admin_uri def gitolite_admin_uri
git['admin_uri'] || 'git@localhost:gitolite-admin' git['admin_uri'] || 'git@localhost:gitolite-admin'
end end
def default_projects_limit
app['default_projects_limit'] || 10
end
end end
end end
Loading
@@ -33,7 +33,7 @@ module Gitlab
Loading
@@ -33,7 +33,7 @@ module Gitlab
end end
   
def configure def configure
Timeout::timeout(20) do Timeout::timeout(30) do
File.open(File.join(Rails.root, 'tmp', "gitlabhq-gitolite.lock"), "w+") do |f| File.open(File.join(Rails.root, 'tmp', "gitlabhq-gitolite.lock"), "w+") do |f|
begin begin
f.flock(File::LOCK_EX) f.flock(File::LOCK_EX)
Loading
Loading
Loading
@@ -21,7 +21,6 @@ namespace :gitlab do
Loading
@@ -21,7 +21,6 @@ namespace :gitlab do
return return
end end
   
GIT_HOST = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git_host"]
print "#{git_base_path}............" print "#{git_base_path}............"
if File.exists?(git_base_path) if File.exists?(git_base_path)
puts "exists".green puts "exists".green
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment