job "virtual-hosting" { group "nginx" { count = 1 network { port "http" { static = 80 } port "https" { static = 443 } } volume "certs" { type = "host" source = "ca-certificates" read_only = true } task "nginx" { driver = "docker" resources { cpu = 50 memory = 20 } volume_mount { volume = "certs" destination = "/var/local/certs" } config { image = "nginx:1.25-alpine" ports = ["http", "https"] volumes = [ "local/nginx.conf:/etc/nginx/nginx.conf", "local/virtual-hosting.conf:/etc/nginx/conf.d/virtual-hosting.conf", ] } template { data = <