ampache-catalog.nomad (1234B)
1 job "ampache-catalog" { 2 datacenters = ["dc1"] 3 type = "batch" 4 5 vault { 6 policies = ["ampache"] 7 change_mode = "noop" 8 } 9 10 periodic { 11 crons = [ 12 "@daily", 13 #"*/12 * * * *" 14 ] 15 } 16 17 group "catalog-update" { 18 count = 1 19 20 volume "ampache" { 21 type = "csi" 22 source = "ampache" 23 access_mode = "multi-node-multi-writer" 24 attachment_mode = "file-system" 25 } 26 27 task "update-catalog" { 28 driver = "podman" 29 30 config { 31 image = "docker.io/ampache/ampache:nosql" 32 command = "/bin/sh" 33 # [-c|--cleanup] [-e|--verify] [-a|--add] [-g|--art] 34 args = ["-c", "/var/www/bin/cli run:updateCatalog -ceag"] 35 volumes = [ 36 # mount the templated config from the task directory to the container 37 "local/ampache.cfg.php:/var/www/config/ampache.cfg.php", 38 ] 39 } 40 41 volume_mount { 42 volume = "ampache" 43 destination = "/media" 44 } 45 46 template { 47 destination = "${NOMAD_TASK_DIR}/ampache.cfg.php" 48 data = file("./templates/ampache.cfg.php.tmpl") 49 uid = 33 50 gid = 33 51 } 52 53 resources { 54 memory = 50 55 memory_max = 256 56 cpu = 100 57 } 58 } 59 } 60 }