Fix custom ports for services

This commit is contained in:
IamTheFij 2023-11-30 13:22:38 -08:00
parent f06e90ab0d
commit cdd4e9b5d5
1 changed files with 12 additions and 4 deletions

View File

@ -31,10 +31,18 @@ job "${name}" {
%{~ endif ~}
%{~ for port in ports }
port "${port.name}" {
%{ if port.host_network != null }host_network = "${port.host_network}"%{ endif ~}
%{ if port.from != null }to = ${port.from}%{ endif ~}
%{ if port.to != null }to = ${port.to}%{ endif ~}
%{ if port.static != null }static = ${port.static}%{ endif ~}
%{~ if port.host_network != null ~}
host_network = "${port.host_network}"
%{~ 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 ~}
}