nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

docker-prune.nomad (495B)


      1 job "docker-prune" {
      2   datacenters = ["dc1"]
      3   type = "sysbatch"
      4 
      5   periodic {
      6     # All 8 hours
      7     cron = "3 1/8 * * *"
      8     prohibit_overlap = true
      9   }
     10 
     11   group "prune" {
     12     count = 1
     13 
     14     network {
     15       mode = "host"
     16     }
     17 
     18     task "docker" {
     19       driver = "raw_exec"
     20 
     21       config {
     22         command = "/usr/bin/sh"
     23         args = ["-c", "podman system prune --all --force"]
     24       }
     25 
     26       resources {
     27         memory = 64
     28         memory_max = 256
     29         cpu    = 100
     30       }
     31     }
     32   }
     33 }