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

Finished with configs

parent 9b337b83
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
 
 
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
 
def edit
Loading
Loading
Loading
Loading
@@ -2,6 +2,10 @@
# Gitlab application config file #
# # # # # # # # # # # # # # # # # #
 
#
# 1. Common settings
# ==========================
# Web application specific settings
web:
host: localhost
Loading
Loading
@@ -13,11 +17,21 @@ web:
email:
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_host:
admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/
host: localhost
# host: localhost
git_user: git
upload_pack: true
receive_pack: true
Loading
Loading
@@ -33,7 +47,3 @@ git:
git_max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds
git_timeout: 10
# Gitlab settings
gitlab:
default_projects_limit: 10
Loading
Loading
@@ -33,7 +33,7 @@ class Settings < Settingslogic
end
 
def ssh_host
git_host['host'] || 'localhost'
git_host['host'] || web_host || 'localhost'
end
 
def ssh_path
Loading
Loading
@@ -49,11 +49,19 @@ class Settings < Settingslogic
end
 
def git_upload_pack
git_host['upload_pack'] || true
if git_host['upload_pack'] == false
false
else
true
end
end
 
def git_receive_pack
git_host['receive_pack'] || true
if git_host['receive_pack'] == false
false
else
true
end
end
 
def git_bin_path
Loading
Loading
@@ -71,5 +79,9 @@ class Settings < Settingslogic
def gitolite_admin_uri
git['admin_uri'] || 'git@localhost:gitolite-admin'
end
def default_projects_limit
app['default_projects_limit'] || 10
end
end
end
Loading
Loading
@@ -33,7 +33,7 @@ module Gitlab
end
 
def configure
Timeout::timeout(20) do
Timeout::timeout(30) do
File.open(File.join(Rails.root, 'tmp', "gitlabhq-gitolite.lock"), "w+") do |f|
begin
f.flock(File::LOCK_EX)
Loading
Loading
Loading
Loading
@@ -21,7 +21,6 @@ namespace :gitlab do
return
end
 
GIT_HOST = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git_host"]
print "#{git_base_path}............"
if File.exists?(git_base_path)
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