Fix custom ports for services

This commit is contained in:
IamTheFij 2023-11-30 13:22:38 -08:00
parent f06e90ab0d
commit cdd4e9b5d5

View File

@ -31,10 +31,18 @@ job "${name}" {
%{~ endif ~} %{~ endif ~}
%{~ for port in ports } %{~ for port in ports }
port "${port.name}" { port "${port.name}" {
%{ if port.host_network != null }host_network = "${port.host_network}"%{ endif ~} %{~ if port.host_network != null ~}
%{ if port.from != null }to = ${port.from}%{ endif ~} host_network = "${port.host_network}"
%{ if port.to != null }to = ${port.to}%{ endif ~} %{~ endif ~}
%{ if port.static != null }static = ${port.static}%{ endif ~} %{~ if port.from != null ~}
from = ${port.from}
%{~ endif ~}
%{~ if port.to != null ~}
to = ${port.to}
%{~ endif ~}
%{~ if port.static != null ~}
static = ${port.static}
%{~ endif ~}
} }
%{~ endfor ~} %{~ endfor ~}
} }