From ac7a6644792fb15036da2ae9e99093a615f69f06 Mon Sep 17 00:00:00 2001 From: SolidNerd Date: Sat, 23 Apr 2016 14:30:35 +0200 Subject: [PATCH] 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 }