job "matrix" { datacenters = ["homelab"] type = "service" meta { forcedeploy = "0" } group "matrix"{ network { mode = "host" port "dendrite" { to = 8008 } port "element" { to = 80 } } vault{ policies= ["dendrite"] } task "dendrite" { driver = "docker" service { name = "dendrite" port = "dendrite" tags = [ "traefik.enable=true", "traefik.http.routers.${NOMAD_TASK_NAME}.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_TASK_NAME}.tls.domains[0].sans=${NOMAD_TASK_NAME}.ducamps.win", "traefik.http.routers.${NOMAD_TASK_NAME}.tls.certresolver=myresolver", ] } config { image = "matrixdotorg/dendrite-monolith" ports = ["dendrite"] volumes = [ "local/dendrite.yaml:/etc/dendrite/dendrite.yaml", "secrets/matrix_key.pem:/etc/dendrite/matrix_key.pem", "/mnt/diskstation/nomad/dendrite/media:/var/dendrite/media" ] } env { } template { data= <