diff --git a/wikijs.nomad b/wikijs.nomad new file mode 100644 index 0000000..a5b6a59 --- /dev/null +++ b/wikijs.nomad @@ -0,0 +1,70 @@ +job "wikijs" { + datacenters = ["homelab"] + type = "service" + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + meta { + forcedeploy = "3" + } + group "wikijs"{ + network { + mode = "host" + port "http" { + to = 3000 + } + } + vault{ + policies= ["access-tables"] + + } + task "wikijs" { + driver = "docker" + service { + name = "wikijs" + port = "http" + tags = [ + "traefik.enable=true", + "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", + "traefik.http.routers.${NOMAD_JOB_NAME}_insecure.middlewares=httpsRedirect", + "traefik.http.routers.${NOMAD_JOB_NAME}_insecure.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", + + + ] + } + config { + image = "ducampsv/wikijs" + ports = ["http"] + volumes = [ + ] + + } + env { + } + + template { + data= <