Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
66c32254
Commit
66c32254
authored
Oct 25, 2020
by
Sven-Hendrik Haase
Browse files
Add some recommended GitLab cleanup tasks (fixes
#110
)
parent
674ffe68
Changes
3
Hide whitespace changes
Inline
Side-by-side
roles/gitlab/files/gitlab-cleanup.service
0 → 100644
View file @
66c32254
[Unit]
Description
=
GitLab Cleanup
[Service]
Type
=
oneshot
ExecStart
=
/usr/bin/docker exec -t gitlab gitlab-ctl registry-garbage-collect --delete-manifests --delete-untagged
ExecStart
=
/usr/bin/docker exec -t gitlab gitlab-rake gitlab:cleanup:project_uploads DRY_RUN=false
ExecStart
=
/usr/bin/docker exec -t gitlab gitlab-rake gitlab:cleanup:orphan_job_artifact_files DRY_RUN=false DEBUG=1 LIMIT=1000
roles/gitlab/files/gitlab-cleanup.timer
0 → 100644
View file @
66c32254
[Unit]
Description=GitLab Cleanup
[Timer]
OnCalendar=weekly
Persistent=true
RandomizedDelaySec=1h
[Install]
WantedBy=timers.target
roles/gitlab/tasks/main.yml
View file @
66c32254
...
...
@@ -102,3 +102,12 @@
when
:
configure_firewall
tags
:
-
firewall
-
name
:
copy gitlab-cleanup timer and service
copy
:
src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
with_items
:
-
gitlab-cleanup.timer
-
gitlab-cleanup.service
-
name
:
activate systemd timers for gitlab-cleanup
systemd
:
name=gitlab-cleanup.timer enabled=yes state=started daemon-reload=yes
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment