Skip to content

Commit fb38970

Browse files
authored
Merge pull request #2140 from achretien/update-gitaly-config
handle new gitaly logs correctly
2 parents ef77293 + f377eda commit fb38970

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ENV GITLAB_VERSION=${VERSION} \
88
GITLAB_SHELL_VERSION=12.2.0 \
99
GITLAB_WORKHORSE_VERSION=8.25.2 \
1010
GITLAB_PAGES_VERSION=1.17.0 \
11-
GITALY_SERVER_VERSION=12.10.0 \
11+
GITALY_SERVER_VERSION=12.10.4 \
1212
GITLAB_USER="git" \
1313
GITLAB_HOME="/home/git" \
1414
GITLAB_LOG_DIR="/var/log/gitlab" \

assets/build/install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,19 @@ ${GITLAB_LOG_DIR}/gitlab-shell/*.log {
266266
}
267267
EOF
268268

269+
# configure gitlab log rotation
270+
cat > /etc/logrotate.d/gitaly <<EOF
271+
${GITLAB_LOG_DIR}/gitaly/*.log {
272+
weekly
273+
missingok
274+
rotate 52
275+
compress
276+
delaycompress
277+
notifempty
278+
copytruncate
279+
}
280+
EOF
281+
269282
# configure gitlab vhost log rotation
270283
cat > /etc/logrotate.d/gitlab-nginx <<EOF
271284
${GITLAB_LOG_DIR}/nginx/*.log {

assets/runtime/config/gitaly/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ path = "{{GITLAB_REPOS_DIR}}"
4545
#
4646

4747
# # You can optionally configure Gitaly to output JSON-formatted log messages to stdout
48-
# [logging]
48+
[logging]
4949
# # The directory where Gitaly stores extra log files
50-
dir = "{{GITLAB_LOG_DIR}}"
50+
dir = "{{GITLAB_LOG_DIR}}/gitaly"
5151
# format = "json"
5252
# # Optional: Set log level to only log entries with that severity or above
5353
# # One of, in order: debug, info, warn, errror, fatal, panic

assets/runtime/functions

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,10 @@ initialize_logdir() {
13471347
mkdir -p ${GITLAB_LOG_DIR}/gitlab-shell
13481348
chmod -R 0755 ${GITLAB_LOG_DIR}/gitlab-shell
13491349
chown -R ${GITLAB_USER}: ${GITLAB_LOG_DIR}/gitlab-shell
1350+
1351+
mkdir -p ${GITLAB_LOG_DIR}/gitaly
1352+
chmod -R 0755 ${GITLAB_LOG_DIR}/gitaly
1353+
chown -R ${GITLAB_USER}: ${GITLAB_LOG_DIR}/gitaly
13501354
}
13511355

13521356
initialize_datadir() {

0 commit comments

Comments
 (0)