nomad

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

aload.nomad (995B)


      1 job "aload" {
      2   datacenters = ["dc1"]
      3 
      4   group "server" {
      5     count = 1
      6 
      7     volume "ampache" {
      8       type = "csi"
      9       source = "ampache"
     10       access_mode = "multi-node-multi-writer"
     11       attachment_mode = "file-system"
     12     }
     13 
     14     network {
     15       port "http" {
     16         to = 80
     17         static = 8092
     18       }
     19     }
     20 
     21     task "aload" {
     22       driver = "podman"
     23 
     24       config {
     25         image = "127.0.0.1:5000/aload:latest"
     26         force_pull = true
     27         ports = ["http"]
     28         volumes = [
     29           # mount the templated config from the task directory to the container
     30           "local/aload.conf:/etc/apache2/conf.d/aload.conf",
     31         ]
     32       }
     33 
     34       template {
     35         destination = "${NOMAD_TASK_DIR}/aload.conf"
     36         data = file("./templates/aload.conf.tmpl")
     37       }
     38 
     39       volume_mount {
     40         volume = "ampache"
     41         destination = "/var/www/localhost/ampache"
     42       }
     43 
     44       resources {
     45         memory = 32
     46         memory_max = 64
     47         cpu    = 100
     48       }
     49     }
     50   }
     51 }