mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
handle new gitaly logs correctly
This commit is contained in:
parent
ef7729373b
commit
f377eda47a
@ -8,7 +8,7 @@ ENV GITLAB_VERSION=${VERSION} \
|
||||
GITLAB_SHELL_VERSION=12.2.0 \
|
||||
GITLAB_WORKHORSE_VERSION=8.25.2 \
|
||||
GITLAB_PAGES_VERSION=1.17.0 \
|
||||
GITALY_SERVER_VERSION=12.10.0 \
|
||||
GITALY_SERVER_VERSION=12.10.4 \
|
||||
GITLAB_USER="git" \
|
||||
GITLAB_HOME="/home/git" \
|
||||
GITLAB_LOG_DIR="/var/log/gitlab" \
|
||||
|
||||
@ -266,6 +266,19 @@ ${GITLAB_LOG_DIR}/gitlab-shell/*.log {
|
||||
}
|
||||
EOF
|
||||
|
||||
# configure gitlab log rotation
|
||||
cat > /etc/logrotate.d/gitaly <<EOF
|
||||
${GITLAB_LOG_DIR}/gitaly/*.log {
|
||||
weekly
|
||||
missingok
|
||||
rotate 52
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
EOF
|
||||
|
||||
# configure gitlab vhost log rotation
|
||||
cat > /etc/logrotate.d/gitlab-nginx <<EOF
|
||||
${GITLAB_LOG_DIR}/nginx/*.log {
|
||||
|
||||
@ -45,9 +45,9 @@ path = "{{GITLAB_REPOS_DIR}}"
|
||||
#
|
||||
|
||||
# # You can optionally configure Gitaly to output JSON-formatted log messages to stdout
|
||||
# [logging]
|
||||
[logging]
|
||||
# # The directory where Gitaly stores extra log files
|
||||
dir = "{{GITLAB_LOG_DIR}}"
|
||||
dir = "{{GITLAB_LOG_DIR}}/gitaly"
|
||||
# format = "json"
|
||||
# # Optional: Set log level to only log entries with that severity or above
|
||||
# # One of, in order: debug, info, warn, errror, fatal, panic
|
||||
|
||||
@ -1347,6 +1347,10 @@ initialize_logdir() {
|
||||
mkdir -p ${GITLAB_LOG_DIR}/gitlab-shell
|
||||
chmod -R 0755 ${GITLAB_LOG_DIR}/gitlab-shell
|
||||
chown -R ${GITLAB_USER}: ${GITLAB_LOG_DIR}/gitlab-shell
|
||||
|
||||
mkdir -p ${GITLAB_LOG_DIR}/gitaly
|
||||
chmod -R 0755 ${GITLAB_LOG_DIR}/gitaly
|
||||
chown -R ${GITLAB_USER}: ${GITLAB_LOG_DIR}/gitaly
|
||||
}
|
||||
|
||||
initialize_datadir() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user