nomad

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

simple-registry.nomad (942B)


      1 job "simple-registry" {
      2   datacenters = ["dc1"]
      3   type = "service"
      4   priority = 85
      5 
      6   group "server" {
      7     count = 5
      8 
      9     volume "registry-data" {
     10       type = "csi"
     11       source = "registry"
     12       access_mode = "multi-node-multi-writer"
     13       attachment_mode = "file-system"
     14     }
     15 
     16     network {
     17       port "http" {
     18         to = 5000
     19         static = 5000
     20         host_network = "private"
     21       }
     22       port "internal-registry" {
     23         to = 5000
     24         static = 5000
     25       }
     26     }
     27 
     28     task "registry" {
     29       driver = "podman"
     30 
     31       volume_mount {
     32         volume = "registry-data"
     33         destination = "/var/lib/registry"
     34       }
     35 
     36       env {
     37         REGISTRY_STORAGE_DELETE_ENABLED = true
     38       }
     39 
     40       config {
     41         image = "registry:latest"
     42         force_pull = false
     43         ports = ["http", "internal-registry"]
     44       }
     45 
     46       resources {
     47         memory = 256
     48         memory_max = 512
     49         cpu    = 500
     50       }
     51     }
     52   }
     53 }