nomad

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

kanboard.nomad (1995B)


      1 # - https://docs.kanboard.org/v1/admin/docker
      2 # - https://github.com/kanboard/kanboard/blob/main/docker-compose.yml
      3 
      4 job "kanboard" {
      5   datacenters = ["dc1"]
      6 
      7   priority = 80
      8 
      9   vault {}
     10 
     11   group "server" {
     12     count = 1
     13 
     14     volume "tls" {
     15       type = "csi"
     16       source = "certbot"
     17       access_mode = "multi-node-multi-writer"
     18       attachment_mode = "file-system"
     19     }
     20     volume "kanboard" {
     21       type = "csi"
     22       source = "kanboard"
     23       access_mode = "multi-node-multi-writer"
     24       attachment_mode = "file-system"
     25     }
     26 
     27     network {
     28       port "kanboard" {
     29         to = 80
     30       }
     31       port "https" {
     32         static = 44400
     33       }
     34     }
     35 
     36     task "kanboard" {
     37       driver = "podman"
     38 
     39       config {
     40         image = "ghcr.io/kanboard/kanboard:nightly"
     41         force_pull = true
     42         ports = ["kanboard"]
     43         volumes = [
     44           # mount the templated config from the task directory to the container
     45           "local/kanboard.php:/var/www/app/data/config.php",
     46         ]
     47       }
     48 
     49       volume_mount {
     50         volume = "kanboard"
     51         destination = "/var/www/app/data"
     52       }
     53 
     54       template {
     55         destination = "${NOMAD_TASK_DIR}/kanboard.php"
     56         data = file("./templates/kanboard.php.tmpl")
     57       }
     58 
     59       resources {
     60         memory = 50
     61         memory_max = 256
     62         cpu    = 200
     63       }
     64     }
     65 
     66     task "nginx" {
     67       driver = "podman"
     68 
     69       config {
     70         image = "docker.io/library/nginx:stable-alpine"
     71         ports = ["https"]
     72         volumes = [
     73           # mount the templated config from the task directory to the container
     74           "local/kanboard.conf:/etc/nginx/conf.d/kanboard.conf",
     75         ]
     76       }
     77 
     78       volume_mount {
     79         volume = "tls"
     80         destination = "/etc/letsencrypt"
     81       }
     82 
     83       template {
     84         destination = "${NOMAD_TASK_DIR}/kanboard.conf"
     85         data = file("./templates/nginx.conf.tmpl")
     86       }
     87 
     88       resources {
     89         memory = 50
     90         memory_max = 256
     91         cpu    = 200
     92       }
     93     }
     94 
     95   }
     96 }