File tree Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ RUN set -ex && \
40
40
&& echo 'deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main' > /etc/apt/sources.list.d/nodesource.list \
41
41
&& wget --quiet -O - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /etc/apt/keyrings/yarn.gpg \
42
42
&& echo 'deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list \
43
+ && wget --quiet -O - https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /etc/apt/keyrings/nginx-archive-keyring.gpg \
44
+ && echo "deb [signed-by=/etc/apt/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu jammy nginx" >> /etc/apt/sources.list.d/nginx.list \
45
+ && printf "Package: *\n Pin: origin nginx.org\n Pin: release o=nginx\n Pin-Priority: 900\n " >> /etc/apt/preferences.d/99nginx \
43
46
&& set -ex \
44
47
&& apt-get update \
45
48
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
@@ -55,7 +58,7 @@ RUN set -ex && \
55
58
&& update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX \
56
59
&& locale-gen en_US.UTF-8 \
57
60
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \
58
- && rm -rf /var/lib/apt/lists/*
61
+ && rm -rf /var/lib/apt/lists/* /etc/nginx/conf.d/default.conf
59
62
60
63
COPY assets/build/ ${GITLAB_BUILD_DIR}/
61
64
RUN bash ${GITLAB_BUILD_DIR}/install.sh
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ map $request_uri $obfuscated_request_uri {
30
30
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
31
31
default $request_uri;
32
32
}
33
- log_format main '$remote_addr - $remote_user [$time_local] '
33
+ log_format gitlab_access '$remote_addr - $remote_user [$time_local] '
34
34
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
35
35
'"$http_referer" "$http_user_agent"';
36
36
@@ -58,7 +58,7 @@ server {
58
58
add_header Strict-Transport-Security "max-age={{NGINX_HSTS_MAXAGE}};";
59
59
60
60
## Individual nginx logs for this GitLab vhost
61
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
61
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_access ;
62
62
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
63
63
64
64
location / {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ server {
11
11
server_name {{GITLAB_REGISTRY_HOST}};
12
12
server_tokens off; ## Don't show the nginx version number, a security best practice
13
13
return 301 https://$http_host:$request_uri;
14
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
14
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access ;
15
15
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
16
16
}
17
17
@@ -36,7 +36,7 @@ server {
36
36
ssl_session_cache builtin:1000 shared:SSL:10m;
37
37
ssl_session_timeout 5m;
38
38
39
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
39
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access ;
40
40
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
41
41
42
42
location / {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ map $request_uri $obfuscated_request_uri {
34
34
~(.+\?)(.*&)?(private_token=|access_token=)[^&]*(&.*|$) $1$2$3****$4;
35
35
default $request_uri;
36
36
}
37
- log_format main '$remote_addr - $remote_user [$time_local] '
37
+ log_format gitlab_ssl_access '$remote_addr - $remote_user [$time_local] '
38
38
'"$request_method $obfuscated_request_uri $server_protocol" $status $body_bytes_sent '
39
39
'"$http_referer" "$http_user_agent"';
40
40
@@ -49,7 +49,7 @@ server {
49
49
server_name _; ## Replace this with something like gitlab.example.com
50
50
server_tokens off; ## Don't show the nginx version number, a security best practice
51
51
return 301 https://$host:{{GITLAB_PORT}}$request_uri;
52
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
52
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access ;
53
53
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
54
54
}
55
55
@@ -103,7 +103,7 @@ server {
103
103
ssl_dhparam {{SSL_DHPARAM_PATH}};
104
104
105
105
## Individual nginx logs for this GitLab vhost
106
- access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log main ;
106
+ access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log gitlab_ssl_access ;
107
107
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_error.log;
108
108
109
109
location / {
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ GITLAB_ACTIONCABLE_CONFIG="${GITLAB_INSTALL_DIR}/config/cable.yml"
23
23
GITLAB_SECRETS_CONFIG=" ${GITLAB_INSTALL_DIR} /config/secrets.yml"
24
24
GITLAB_ROBOTS_CONFIG=" ${GITLAB_INSTALL_DIR} /public/robots.txt"
25
25
GITLAB_SHELL_CONFIG=" ${GITLAB_SHELL_INSTALL_DIR} /config.yml"
26
- GITLAB_NGINX_CONFIG=" /etc/nginx/sites-enabled /gitlab"
27
- GITLAB_CI_NGINX_CONFIG=" /etc/nginx/sites-enabled /gitlab_ci"
28
- GITLAB_REGISTRY_NGINX_CONFIG=" /etc/nginx/sites-enabled /gitlab-registry"
29
- GITLAB_PAGES_NGINX_CONFIG=" /etc/nginx/sites-enabled /gitlab-pages"
26
+ GITLAB_NGINX_CONFIG=" /etc/nginx/conf.d /gitlab.conf "
27
+ GITLAB_CI_NGINX_CONFIG=" /etc/nginx/conf.d /gitlab_ci.conf "
28
+ GITLAB_REGISTRY_NGINX_CONFIG=" /etc/nginx/conf.d /gitlab-registry.conf "
29
+ GITLAB_PAGES_NGINX_CONFIG=" /etc/nginx/conf.d /gitlab-pages.conf "
30
30
GITLAB_PAGES_CONFIG=" ${GITLAB_INSTALL_DIR} /gitlab-pages-config"
31
31
GITLAB_GITALY_CONFIG=" ${GITLAB_GITALY_INSTALL_DIR} /config.toml"
32
32
You can’t perform that action at this time.
0 commit comments