job "nginx" { datacenters = ["dc1"] group "nginx" { count = 1 network { port "http" { static = 80 } port "https" { static = 443 } } # volume "certs" { # type = "host" # source = "ca-certificates" # # read_only = true # } service { name = "nginx" port = "http" } task "nginx" { driver = "docker" config { ports = ["http", "https"] image = "nginx" volumes = [ "local:/etc/nginx/conf.d", #"certs:..." ] } template { data = file("../config/dummy-http-server.tpl") destination = "local/dummy-http-server.conf" change_mode = "signal" change_signal = "SIGHUP" } template { data = file("../config/gitea.tpl") destination = "local/gitea.conf" change_mode = "signal" change_signal = "SIGHUP" } } } }