Non-interactive AWS install by running a single script.
Merge branch 'master' into non-interactive-aws-install Conflicts: doc/installation.md Fix merge mess in installation.md
This commit is contained in:
parent
eae41ad1df
commit
b80dd3d242
215 changed files with 3829 additions and 3348 deletions
|
@ -23,7 +23,7 @@ module Gitlab
|
|||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
||||
# Activate observers that should always be running.
|
||||
config.active_record.observers = :mailer_observer, :activity_observer, :project_observer, :key_observer, :issue_observer, :user_observer, :system_hook_observer
|
||||
config.active_record.observers = :mailer_observer, :activity_observer, :project_observer, :key_observer, :issue_observer, :user_observer, :system_hook_observer, :users_project_observer
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
|
|
|
@ -3,5 +3,3 @@ require File.expand_path('../application', __FILE__)
|
|||
|
||||
# Initialize the rails application
|
||||
Gitlab::Application.initialize!
|
||||
|
||||
require File.join(Rails.root, "lib", "gitlab", "git_host")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# # # # # # # # # # # # # # # # # #
|
||||
# # # # # # # # # # # # # # # # # #
|
||||
# Gitlab application config file #
|
||||
# # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
@ -19,27 +19,27 @@ email:
|
|||
|
||||
# Application specific settings
|
||||
# Like default project limit for user etc
|
||||
app:
|
||||
default_projects_limit: 10
|
||||
app:
|
||||
default_projects_limit: 10
|
||||
# backup_path: "/vol/backups" # default: Rails.root + backups/
|
||||
# backup_keep_time: 604800 # default: 0 (forever) (in seconds)
|
||||
# disable_gravatar: true # default: false - Disable user avatars from Gravatar.com
|
||||
|
||||
|
||||
#
|
||||
# 2. Advanced settings:
|
||||
#
|
||||
# 2. Advanced settings:
|
||||
# ==========================
|
||||
|
||||
# Git Hosting configuration
|
||||
git_host:
|
||||
admin_uri: git@localhost:gitolite-admin
|
||||
base_path: /home/git/repositories/
|
||||
# hooks_path: /var/lib/gitolite/.gitolite/hooks/ # only needed when gitolite is not installed according the manual
|
||||
# host: localhost
|
||||
git_user: git
|
||||
upload_pack: true
|
||||
receive_pack: true
|
||||
# port: 22
|
||||
|
||||
|
||||
# Git settings
|
||||
# Use default values unless you understand it
|
||||
git:
|
||||
|
|
|
@ -66,6 +66,10 @@ class Settings < Settingslogic
|
|||
git_host['base_path'] || '/home/git/repositories/'
|
||||
end
|
||||
|
||||
def git_hooks_path
|
||||
git_host['hooks_path'] || '/home/git/share/gitolite/hooks/'
|
||||
end
|
||||
|
||||
def git_upload_pack
|
||||
if git_host['upload_pack'] != false
|
||||
true
|
||||
|
@ -111,5 +115,9 @@ class Settings < Settingslogic
|
|||
def backup_keep_time
|
||||
app['backup_keep_time'] || 0
|
||||
end
|
||||
|
||||
def disable_gravatar?
|
||||
app['disable_gravatar'] || false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
5
config/initializers/5_backend.rb
Normal file
5
config/initializers/5_backend.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
# GIT over HTTP
|
||||
require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
|
||||
|
||||
# GITOLITE backend
|
||||
require Rails.root.join("lib", "gitlab", "backend", "gitolite")
|
|
@ -1,54 +0,0 @@
|
|||
module Grack
|
||||
class Auth < Rack::Auth::Basic
|
||||
|
||||
def valid?
|
||||
# Authentication with username and password
|
||||
email, password = @auth.credentials
|
||||
user = User.find_by_email(email)
|
||||
return false unless user.try(:valid_password?, password)
|
||||
|
||||
# Set GL_USER env variable
|
||||
ENV['GL_USER'] = email
|
||||
# Pass Gitolite update hook
|
||||
ENV['GL_BYPASS_UPDATE_HOOK'] = "true"
|
||||
|
||||
# Need this patch because the rails mount
|
||||
@env['PATH_INFO'] = @env['REQUEST_PATH']
|
||||
|
||||
# Find project by PATH_INFO from env
|
||||
if m = /^\/([\w-]+).git/.match(@env['PATH_INFO']).to_a
|
||||
return false unless project = Project.find_by_path(m.last)
|
||||
end
|
||||
|
||||
# Git upload and receive
|
||||
if @env['REQUEST_METHOD'] == 'GET'
|
||||
true
|
||||
elsif @env['REQUEST_METHOD'] == 'POST'
|
||||
if @env['REQUEST_URI'].end_with?('git-upload-pack')
|
||||
return project.dev_access_for?(user)
|
||||
elsif @env['REQUEST_URI'].end_with?('git-receive-pack')
|
||||
if project.protected_branches.map(&:name).include?(current_ref)
|
||||
project.master_access_for?(user)
|
||||
else
|
||||
project.dev_access_for?(user)
|
||||
end
|
||||
else
|
||||
false
|
||||
end
|
||||
else
|
||||
false
|
||||
end
|
||||
end# valid?
|
||||
|
||||
def current_ref
|
||||
if @env["HTTP_CONTENT_ENCODING"] =~ /gzip/
|
||||
input = Zlib::GzipReader.new(@request.body).string
|
||||
else
|
||||
input = @request.body.string
|
||||
end
|
||||
|
||||
oldrev, newrev, ref = input.split(' ')
|
||||
/refs\/heads\/([\w-]+)/.match(ref).to_a.last
|
||||
end
|
||||
end# Auth
|
||||
end# Grack
|
|
@ -1,3 +0,0 @@
|
|||
#if defined?(Footnotes) && Rails.env.development?
|
||||
#Footnotes.run! # first of all
|
||||
#end
|
|
@ -30,6 +30,7 @@ Gitlab::Application.routes.draw do
|
|||
get 'help/web_hooks' => 'help#web_hooks'
|
||||
get 'help/system_hooks' => 'help#system_hooks'
|
||||
get 'help/markdown' => 'help#markdown'
|
||||
get 'help/ssh' => 'help#ssh'
|
||||
|
||||
#
|
||||
# Admin Area
|
||||
|
@ -196,7 +197,9 @@ Gitlab::Application.routes.draw do
|
|||
end
|
||||
resources :team_members
|
||||
resources :milestones
|
||||
resources :labels, :only => [:index]
|
||||
resources :issues do
|
||||
|
||||
collection do
|
||||
post :sort
|
||||
post :bulk_update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue