From 83745f737ab5143f7204c2b84425c727266a0d84 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 15 Apr 2022 14:24:41 +0200 Subject: Deployment on Nomad --- app/backup/deploy/backup-weekly.hcl | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 app/backup/deploy/backup-weekly.hcl (limited to 'app/backup/deploy/backup-weekly.hcl') diff --git a/app/backup/deploy/backup-weekly.hcl b/app/backup/deploy/backup-weekly.hcl new file mode 100644 index 0000000..9c1a0b0 --- /dev/null +++ b/app/backup/deploy/backup-weekly.hcl @@ -0,0 +1,55 @@ +job "backup_weekly" { + datacenters = ["dc1"] + type = "batch" + + priority = "60" + + periodic { + cron = "@weekly" + // Do not allow overlapping runs. + prohibit_overlap = true + } + + group "backup-psql" { + task "main" { + driver = "docker" + + config { + image = "superboum/backup-psql-docker:kldrj9xlbda1s4v963jhpgardg6qczgl" + volumes = [ + // Mount a cache on the hard disk to avoid filling the SSD + "/mnt/storage/tmp_bckp_psql:/mnt/cache" + ] + } + + template { + data = <