job "drone" { datacenters = ["homelab"] priority = 50 type = "service" vault { policies = ["droneci"] } group "droneCI" { network { mode = "host" port "http" { to = 80 } port "vault" { to= 3000 } } constraint { attribute = "${attr.cpu.arch}" value = "amd64" } task "drone-server" { driver = "docker" service { name = "drone" port = "http" tags = [ "homer.enable=true", "homer.name=DroneCI", "homer.service=Platform", "homer.logo=https://drone.ducamps.eu/static/media/logo.76c744d4.svg", "homer.target=_blank", "homer.url=https://${NOMAD_JOB_NAME}.ducamps.eu", "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.eu`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.eu", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", "traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https", "traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=httpsRedirect", "traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure", ] } config { image = "docker.service.consul:5000/drone/drone:latest" ports = [ "http" ] } env { } template { data = <