Commit 68a930a8 authored by Michael H. Oshita's avatar Michael H. Oshita

Make max upload size configurable

parent fbed3cee
......@@ -67,6 +67,7 @@ default['gitlab']['host'] = "localhost"
default['gitlab']['email_from'] = "gitlab@localhost"
default['gitlab']['support_email'] = "support@localhost"
default['gitlab']['max_size'] = "5242880" #5.megabytes
default['gitlab']['signup_enabled'] = false
default['gitlab']['signin_enabled'] = true
default['gitlab']['projects_limit'] = 10
......@@ -175,6 +176,7 @@ default['gitlab']['ssl_certificate_path'] = "/etc/ssl" # Path to .crt file. If i
default['gitlab']['ssl_certificate_key_path'] = "/etc/ssl" # Path to .key file. If directory doesn't exist it will be created
default['gitlab']['ssl_certificate'] = "" # SSL certificate
default['gitlab']['ssl_certificate_key'] = "" # SSL certificate key
default['gitlab']['client_max_body_size'] = "20m"
# SMTP email
default['gitlab']['smtp'] = {
......
......@@ -19,7 +19,8 @@ template File.join(gitlab['shell_path'], "config.yml") do
:redis_host => gitlab['redis_host'],
:redis_port => gitlab['redis_port'],
:namespace => gitlab['namespace'],
:self_signed_cert => gitlab['self_signed_cert']
:self_signed_cert => gitlab['self_signed_cert'],
:max_size => gitlab['max_size']
})
end
......
......@@ -16,6 +16,7 @@ template File.join(gitlab['path'], 'config', 'gitlab.yml') do
:user => gitlab['user'],
:email_from => gitlab['email_from'],
:support_email => gitlab['support_email'],
:max_size => gitlab['max_size'],
:satellites_path => gitlab['satellites_path'],
:repos_path => gitlab['repos_path'],
:shell_path => gitlab['shell_path'],
......
......@@ -22,7 +22,8 @@ template path do
:port => gitlab['port'],
:url => gitlab['url'],
:ssl_certificate_path => gitlab['ssl_certificate_path'],
:ssl_certificate_key_path => gitlab['ssl_certificate_key_path']
:ssl_certificate_key_path => gitlab['ssl_certificate_key_path'],
:client_max_body_size => gitlab['client_max_body_size']
})
end
......
......@@ -24,7 +24,8 @@ describe "gitlab::gitlab_shell_install" do
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab",
self_signed_cert: false
self_signed_cert: false,
max_size: "5242880"
}
)
end
......@@ -77,7 +78,8 @@ describe "gitlab::gitlab_shell_install" do
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab",
self_signed_cert: false
self_signed_cert: false,
max_size: "5242880"
}
)
end
......@@ -117,7 +119,8 @@ describe "gitlab::gitlab_shell_install" do
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab",
self_signed_cert: false
self_signed_cert: false,
max_size: "5242880"
}
)
end
......@@ -170,7 +173,8 @@ describe "gitlab::gitlab_shell_install" do
redis_host: "127.0.0.1",
redis_port: "6379",
namespace: "resque:gitlab",
self_signed_cert: false
self_signed_cert: false,
max_size: "5242880"
}
)
end
......
......@@ -21,6 +21,7 @@ describe "gitlab::install" do
user: 'git',
email_from: 'gitlab@localhost',
support_email: 'support@localhost',
max_size: '5242880',
satellites_path: '/home/git/gitlab-satellites',
repos_path: '/home/git/repositories',
shell_path: '/home/git/gitlab-shell',
......@@ -432,6 +433,7 @@ describe "gitlab::install" do
user: 'git',
email_from: 'gitlab@localhost',
support_email: 'support@localhost',
max_size: '5242880',
satellites_path: '/home/git/gitlab-satellites',
repos_path: '/home/git/repositories',
shell_path: '/home/git/gitlab-shell',
......
......@@ -26,7 +26,8 @@ describe "gitlab::nginx" do
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
ssl_certificate_key_path: "/etc/ssl"
ssl_certificate_key_path: "/etc/ssl",
client_max_body_size: "20m"
}
)
end
......@@ -67,7 +68,8 @@ describe "gitlab::nginx" do
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
ssl_certificate_key_path: "/etc/ssl"
ssl_certificate_key_path: "/etc/ssl",
client_max_body_size: "20m"
}
)
end
......@@ -114,7 +116,8 @@ describe "gitlab::nginx" do
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
ssl_certificate_key_path: "/etc/ssl"
ssl_certificate_key_path: "/etc/ssl",
client_max_body_size: "20m"
}
)
end
......@@ -151,7 +154,8 @@ describe "gitlab::nginx" do
port: "80",
url: "http://localhost:80/",
ssl_certificate_path: "/etc/ssl",
ssl_certificate_key_path: "/etc/ssl"
ssl_certificate_key_path: "/etc/ssl",
client_max_body_size: "20m"
}
)
end
......
......@@ -219,7 +219,7 @@ production: &base
# The next value is the maximum memory size grit can use
# Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
max_size: 5242880 # 5.megabytes
max_size: <%= @max_size %>
# Git timeout to read a commit, in seconds
timeout: 10
......
......@@ -44,7 +44,7 @@ server {
# Increase this if you want to upload large attachments
# Or if you want to accept large git objects over http
client_max_body_size 20m;
client_max_body_size <%= @client_max_body_size %>;
# individual nginx logs for this gitlab vhost
access_log /var/log/nginx/gitlab_access.log;
......
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