🔧 Set sane Gitea retention and cleanup defaults 🔧

Shorter Actions retention and enable Gitea's built-in cleanup cron
tasks. Existing configs receive missing keys only; user-set values
are never overwritten.

- rootfs/tmp/etc/gitea/app.ini: artifacts 30d, logs 90d, runs 180d; enable gc_lfs, git_gc_repos, delete_old_actions, delete_old_system_notices; explicit cleanup_actions/cleanup_action_runs
- rootfs/usr/local/etc/docker/init.d/08-gitea.sh: add __gitea_ini_default and apply retention/cron defaults to existing configs when missing
- README.md: document retention defaults
- TODO.AI.md: record the change and its verification

Claude-Session: https://claude.ai/code/session_01Kae22tmhzhmfHyqc34PZbx
This commit is contained in:
casjay committed 2026-10-03 11:28:28 -04:00
1 parent cb16b1659b
commit 5b4079dc41
4 files changed
+76 -1

No files matched your search

+36 -1
View File
@@ -250,7 +250,9 @@ NO_REPLY_ADDRESS = no-reply.REPLACE_SE
[actions]
ENABLED = true
DEFAULT_ACTIONS_URL = github
ARTIFACT_RETENTION_DAYS = 90
ARTIFACT_RETENTION_DAYS = 30
LOG_RETENTION_DAYS = 90
RUN_RETENTION_DAYS = 180
ZOMBIE_TASK_TIMEOUT = 10m
ENDLESS_TASK_TIMEOUT = 3h
ABANDONED_JOB_TIMEOUT = 24h
@@ -381,3 +383,36 @@ RUN_AT_START = false
ENABLE_SUCCESS_NOTICE = true
SCHEDULE = @every 168h
HTTP_ENDPOINT = https://dl.gitea.io/gitea/version.json
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.cleanup_actions]
ENABLED = true
SCHEDULE = @midnight
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.cleanup_action_runs]
ENABLED = true
SCHEDULE = @midnight
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.gc_lfs]
ENABLED = true
RUN_AT_START = false
SCHEDULE = @every 24h
OLDER_THAN = 168h
LAST_UPDATED_MORE_THAN_AGO = 72h
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.git_gc_repos]
ENABLED = true
RUN_AT_START = false
SCHEDULE = @every 168h
TIMEOUT = 30m
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.delete_old_actions]
ENABLED = true
RUN_AT_START = false
SCHEDULE = @every 168h
OLDER_THAN = 8760h
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[cron.delete_old_system_notices]
ENABLED = true
RUN_AT_START = false
SCHEDULE = @every 168h
OLDER_THAN = 2160h