Add cron to gc on gitea servers
As new change refs accumulate, replication pushes and page loads will take longer as git stats all of the refs/ files. To avoid that, pack refs and gc every week to keep the number of files and space used minimal. Change-Id: Iff273ebbc25a512ab7e12b8418ceb30e7c722f92
This commit is contained in:
parent
509ec18dc9
commit
b87c2d02ab
@ -126,3 +126,11 @@
|
||||
key: "{{ gitea_gerrit_public_key }}"
|
||||
read_only: false
|
||||
title: "Gerrit replication key"
|
||||
- name: Set up cron job to pack git refs
|
||||
cron:
|
||||
name: pack-git-refs
|
||||
state: present
|
||||
job: "docker exec -t giteadocker_gitea-web_1 find /data/git/repositories/ -maxdepth 2 -name *.git -type d -execdir git --git-dir={} gc \\;"
|
||||
minute: 37
|
||||
hour: 12
|
||||
weekday: 0
|
||||
|
Loading…
Reference in New Issue
Block a user