diff --git a/Changelog.md b/Changelog.md index 571886fc..7df8818b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**latest** +- added NGINX_MAX_UPLOAD_SIZE configuration to specify the maximum acceptable size of attachments. + **6.8.2** - upgrade to gitlab-ce 6.8.2 - renamed configuration option GITLAB_SHELL_SSH_PORT to GITLAB_SSH_PORT diff --git a/README.md b/README.md index 4e1ce163..4dfa984e 100644 --- a/README.md +++ b/README.md @@ -579,6 +579,7 @@ Below is the complete list of available options that can be used to customize yo - **SSL_KEY_PATH**: Location of the ssl private key. Defaults to /home/git/data/certs/gitlab.key - **SSL_DHPARAM_PATH**: Location of the dhparam file. Defaults to /home/git/data/certs/dhparam.pem - **CA_CERTIFICATES_PATH**: List of SSL certificates to trust. Defaults to /home/git/data/certs/ca.crt. +- **NGINX_MAX_UPLOAD_SIZE**: Maximum acceptable upload size. Defaults to 20m. - **REDIS_HOST**: The hostname of the redis server. Defaults to localhost - **REDIS_PORT**: The connection port of the redis server. Defaults to 6379. - **UNICORN_WORKERS**: The number of unicorn workers to start. Defaults to 2. diff --git a/assets/config/nginx/gitlab b/assets/config/nginx/gitlab index 26469245..a7f4c2bc 100644 --- a/assets/config/nginx/gitlab +++ b/assets/config/nginx/gitlab @@ -27,7 +27,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 {{NGINX_MAX_UPLOAD_SIZE}}; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; diff --git a/assets/config/nginx/gitlab.https.permissive b/assets/config/nginx/gitlab.https.permissive index 436c7a7d..3157c8e4 100644 --- a/assets/config/nginx/gitlab.https.permissive +++ b/assets/config/nginx/gitlab.https.permissive @@ -27,7 +27,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 {{NGINX_MAX_UPLOAD_SIZE}}; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; @@ -91,7 +91,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 {{NGINX_MAX_UPLOAD_SIZE}}; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; diff --git a/assets/config/nginx/gitlab.https.strict b/assets/config/nginx/gitlab.https.strict index 9e6155f4..b45727fe 100644 --- a/assets/config/nginx/gitlab.https.strict +++ b/assets/config/nginx/gitlab.https.strict @@ -48,7 +48,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 {{NGINX_MAX_UPLOAD_SIZE}}; # individual nginx logs for this gitlab vhost access_log /var/log/nginx/gitlab_access.log; diff --git a/assets/init b/assets/init index 545564a5..8885c864 100755 --- a/assets/init +++ b/assets/init @@ -24,6 +24,8 @@ CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-/home/git/data/certs/ca.crt} GITLAB_BACKUPS=${GITLAB_BACKUPS:-disable} GITLAB_BACKUP_EXPIRY=${GITLAB_BACKUP_EXPIRY:-} +NGINX_MAX_UPLOAD_SIZE=${NGINX_MAX_UPLOAD_SIZE:-20m} + REDIS_HOST=${REDIS_HOST:-} REDIS_PORT=${REDIS_PORT:-} @@ -194,6 +196,7 @@ sed 's/{{GITLAB_PORT}}/'"${GITLAB_PORT}"'/' -i /etc/nginx/sites-available/gitlab sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i /etc/nginx/sites-available/gitlab sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i /etc/nginx/sites-available/gitlab sed 's,{{SSL_DHPARAM_PATH}},'"${SSL_DHPARAM_PATH}"',' -i /etc/nginx/sites-available/gitlab +sed 's/{{NGINX_MAX_UPLOAD_SIZE}}/'"${NGINX_MAX_UPLOAD_SIZE}"'/g' -i /etc/nginx/sites-available/gitlab supervisorctl start nginx echo "Updating CA certificates..."