Commit 66c32254 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Add some recommended GitLab cleanup tasks (fixes #110)

parent 674ffe68
[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
[Unit]
Description=GitLab Cleanup
[Timer]
OnCalendar=weekly
Persistent=true
RandomizedDelaySec=1h
[Install]
WantedBy=timers.target
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment