Merge pull request #2517 from kkimurak/issue/2515-support-nginx-custom-config

add NGINX_CUSTOM_GITLAB_SERVER_CONFIG
This commit is contained in:
Steven Achilles 2022-03-24 08:40:15 +01:00 committed by GitHub
commit d7e5e7e294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 1 deletions

View File

@ -1001,6 +1001,7 @@ Below is the complete list of available options that can be used to customize yo
| `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_REAL_IP_RECURSIVE` | set to `on` if docker container runs behind a reverse proxy,you may not want the IP address of the proxy to show up as the client address. `off` by default. |
| `NGINX_REAL_IP_TRUSTED_ADDRESSES` | You can have NGINX look for a different address to use by adding your reverse proxy to the `NGINX_REAL_IP_TRUSTED_ADDRESSES`. Currently only a single entry is permitted. No defaults. |
| `NGINX_CUSTOM_GITLAB_SERVER_CONFIG` | Advanced configuration option. You can add custom configuration for nginx as you like (e.g. custom location proxy). This is similar to setting `nginx['custom_gitlab_server_config']` to `gitlab.rb` for gitlab-omnibus. No defaults. |
| `REDIS_HOST` | The hostname of the redis server. Defaults to `localhost` |
| `REDIS_PORT` | The connection port of the redis server. Defaults to `6379`. |
| `REDIS_DB_NUMBER` | The redis database number. Defaults to '0'. |

View File

@ -94,4 +94,5 @@ server {
internal;
}
{{NGINX_CUSTOM_GITLAB_SERVER_CONFIG}}
}

View File

@ -139,4 +139,6 @@ server {
root {{GITLAB_INSTALL_DIR}}/public;
internal;
}
{{NGINX_CUSTOM_GITLAB_SERVER_CONFIG}}
}

View File

@ -312,6 +312,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_CUSTOM_GITLAB_SERVER_CONFIG=${NGINX_CUSTOM_GITLAB_SERVER_CONFIG:-}
## MAIL DELIVERY
SMTP_DOMAIN=${SMTP_DOMAIN:-www.gmail.com}

View File

@ -1329,7 +1329,8 @@ nginx_configure_gitlab() {
GITLAB_PORT \
NGINX_PROXY_BUFFERING \
NGINX_ACCEL_BUFFERING \
NGINX_X_FORWARDED_PROTO
NGINX_X_FORWARDED_PROTO \
NGINX_CUSTOM_GITLAB_SERVER_CONFIG
nginx_configure_gitlab_ssl
nginx_configure_gitlab_hsts