job "nginx" { datacenters = ["dc1"] group "nginx" { count = 1 network { mode = "bridge" port "http" { static = 80 } port "https" { static = 443 } } # volume "certs" { # type = "host" # source = "ca-certificates" # # read_only = true # } service { name = "nginx" port = "http" } service { name = "nginx-gitea-frontend-connector" connect { sidecar_service { proxy { upstreams { # Required destination_name = "gitea-frontend" local_bind_port = "3000" # Optional local_bind_address = "127.0.0.1" } } } } } 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" } } } }