-
Notifications
You must be signed in to change notification settings - Fork 6
Cronjobs
A.s. edited this page Oct 21, 2024
·
16 revisions
Correspondingly,
- clean-up
/tmp
from files older than 6 months. - remove all docker dangling images, networks, and volumes.
- re-build images to cache new layers to speed up any deployments.
- remove any instant backups (
*.sqldump
) that are older than a week.
0 1 * * 6 find /tmp/ -ctime +180 -exec /bin/rm -rf {} +
0 2 * * 6 docker system prune -a -f --volumes
0 3 * * * nice -n 5 docker-compose -f /root/parkour2/docker-compose.yml build
0 4 * * * make -C /root/parkour2 sweep
0 5 * * * uv cache prune # only if you have it
To keep the django_session
database table under control.
0 5 * * 6 docker-compose exec -it parkour2-django python manage.py clearsessions
Note
On production, there's also the backup strategy that's bundled in the rsnapshot
container.
To re-deploy the app with a new database snapshot from production so that staff can access a dev deployment for testing.
*/30 * * * * make -C /root/parkour2 clean import-pgdb dev-migras
Note
This 'staging' VM also serve us, bioinformaticians, to test our (short- or long-reads) demultiplexing, and (secondary) analyses, pipelines that tightly integrate to our LIMS.