From ac7a6644792fb15036da2ae9e99093a615f69f06 Mon Sep 17 00:00:00 2001 From: SolidNerd Date: Sat, 23 Apr 2016 14:30:35 +0200 Subject: [PATCH 1/3] Add possibility to set the client_body_max_size for gitlab_ci --- README.md | 1 + assets/runtime/config/nginx/gitlab_ci | 2 +- assets/runtime/env-defaults | 2 +- assets/runtime/functions | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c0d61ae..ff6b91e3 100644 --- a/README.md +++ b/README.md @@ -829,6 +829,7 @@ Below is the complete list of available options that can be used to customize yo - **NGINX_PROXY_BUFFERING**: Enable `proxy_buffering`. Defaults to `off`. - **NGINX_ACCEL_BUFFERING**: Enable `X-Accel-Buffering` header. Default to `no` - **NGINX_X_FORWARDED_PROTO**: Advanced configuration option for the `proxy_set_header X-Forwarded-Proto` setting in the gitlab nginx vHost configuration. Defaults to `https` when `GITLAB_HTTPS` is `true`, else defaults to `$scheme`. +- **NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE**: Sets the client_max_body_size of GitLab CI. `$GITLAB_CI_HOST` must be set to get this working. This could be used for large logs or artifacts that are greater than the default. Defaults to `10m` . - **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 `3`. diff --git a/assets/runtime/config/nginx/gitlab_ci b/assets/runtime/config/nginx/gitlab_ci index ec8ade74..13db095b 100644 --- a/assets/runtime/config/nginx/gitlab_ci +++ b/assets/runtime/config/nginx/gitlab_ci @@ -24,5 +24,5 @@ server { # adjust this to match the largest build log your runners might submit, # set to 0 to disable limit - client_max_body_size 10m; + client_max_body_size {{NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE}}; } diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index c5939b37..e99578a0 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -144,7 +144,7 @@ case ${GITLAB_HTTPS} in true) NGINX_X_FORWARDED_PROTO=${NGINX_X_FORWARDED_PROTO:-https} ;; *) NGINX_X_FORWARDED_PROTO=${NGINX_X_FORWARDED_PROTO:-\$scheme} ;; esac - +NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE=${NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE:-10m} ## MAIL DELIVERY SMTP_DOMAIN=${SMTP_DOMAIN:-www.gmail.com} SMTP_HOST=${SMTP_HOST:-smtp.gmail.com} diff --git a/assets/runtime/functions b/assets/runtime/functions index 4bd5c7d4..2891d631 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -839,7 +839,8 @@ nginx_configure_gitlab_ci() { GITLAB_LOG_DIR \ GITLAB_HOST \ GITLAB_CI_HOST \ - DNS_RESOLVERS + DNS_RESOLVERS \ + NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE fi } From 8ac510f88842b8bfa3cf52cd00761fe45dd3c7a8 Mon Sep 17 00:00:00 2001 From: SolidNerd Date: Sat, 23 Apr 2016 18:10:58 +0200 Subject: [PATCH 2/3] Revert "Add possibility to set the client_body_max_size for gitlab_ci" This reverts commit ac7a6644792fb15036da2ae9e99093a615f69f06. --- README.md | 1 - assets/runtime/config/nginx/gitlab_ci | 2 +- assets/runtime/env-defaults | 2 +- assets/runtime/functions | 3 +-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ff6b91e3..9c0d61ae 100644 --- a/README.md +++ b/README.md @@ -829,7 +829,6 @@ Below is the complete list of available options that can be used to customize yo - **NGINX_PROXY_BUFFERING**: Enable `proxy_buffering`. Defaults to `off`. - **NGINX_ACCEL_BUFFERING**: Enable `X-Accel-Buffering` header. Default to `no` - **NGINX_X_FORWARDED_PROTO**: Advanced configuration option for the `proxy_set_header X-Forwarded-Proto` setting in the gitlab nginx vHost configuration. Defaults to `https` when `GITLAB_HTTPS` is `true`, else defaults to `$scheme`. -- **NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE**: Sets the client_max_body_size of GitLab CI. `$GITLAB_CI_HOST` must be set to get this working. This could be used for large logs or artifacts that are greater than the default. Defaults to `10m` . - **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 `3`. diff --git a/assets/runtime/config/nginx/gitlab_ci b/assets/runtime/config/nginx/gitlab_ci index 13db095b..ec8ade74 100644 --- a/assets/runtime/config/nginx/gitlab_ci +++ b/assets/runtime/config/nginx/gitlab_ci @@ -24,5 +24,5 @@ server { # adjust this to match the largest build log your runners might submit, # set to 0 to disable limit - client_max_body_size {{NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE}}; + client_max_body_size 10m; } diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index e99578a0..c5939b37 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -144,7 +144,7 @@ case ${GITLAB_HTTPS} in true) NGINX_X_FORWARDED_PROTO=${NGINX_X_FORWARDED_PROTO:-https} ;; *) NGINX_X_FORWARDED_PROTO=${NGINX_X_FORWARDED_PROTO:-\$scheme} ;; esac -NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE=${NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE:-10m} + ## MAIL DELIVERY SMTP_DOMAIN=${SMTP_DOMAIN:-www.gmail.com} SMTP_HOST=${SMTP_HOST:-smtp.gmail.com} diff --git a/assets/runtime/functions b/assets/runtime/functions index 2891d631..4bd5c7d4 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -839,8 +839,7 @@ nginx_configure_gitlab_ci() { GITLAB_LOG_DIR \ GITLAB_HOST \ GITLAB_CI_HOST \ - DNS_RESOLVERS \ - NGINX_GITLAB_CI_CLIENT_MAX_BODY_SIZE + DNS_RESOLVERS fi } From ed36b3340f0f63ebc09ed144eff0b422e6a7f457 Mon Sep 17 00:00:00 2001 From: SolidNerd Date: Sat, 23 Apr 2016 18:12:58 +0200 Subject: [PATCH 3/3] Set client_body_max_size in gitlab_ci to 0 --- assets/runtime/config/nginx/gitlab_ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/runtime/config/nginx/gitlab_ci b/assets/runtime/config/nginx/gitlab_ci index ec8ade74..870ecb4e 100644 --- a/assets/runtime/config/nginx/gitlab_ci +++ b/assets/runtime/config/nginx/gitlab_ci @@ -24,5 +24,5 @@ server { # adjust this to match the largest build log your runners might submit, # set to 0 to disable limit - client_max_body_size 10m; + client_max_body_size 0; }