diff --git a/nomad-job/decom/plex.nomad b/nomad-job/decom/plex.nomad new file mode 100644 index 0000000..95ce053 --- /dev/null +++ b/nomad-job/decom/plex.nomad @@ -0,0 +1,50 @@ + +job "plex" { + datacenters = ["homelab"] + type = "service" + meta { + forcedeploy = "0" + } + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + group "plex"{ + network { + mode = "host" + port "http" { + static = 32400 + } + } + + task "plex" { + driver = "docker" + service { + name = "plex" + 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", + + + ] + } + config { + image = "plexinc/pms-docker" + ports = ["http"] + volumes = [ + "/mnt/diskstation/nomad/plex/config:/config", + "/mnt/diskstation/media/:/data" + ] + + } + resources { + memory = 300 + } + } + + } +}