This commit is contained in:
Andras Bacsai
2022-11-02 16:03:27 +01:00
parent 99ff020f56
commit a22f26c4c8
4 changed files with 11 additions and 7 deletions

View File

@@ -198,11 +198,9 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
}
}
}
} else {
parsedTemplate = foundTemplate
}
let strParsedTemplate = JSON.stringify(parsedTemplate)
// replace $$id and $$workdir
@@ -223,7 +221,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin
continue;
}
if (value === '$$generate_fqdn') {
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.fqdn || '' + "\"")
strParsedTemplate = strParsedTemplate.replaceAll(regex, service.fqdn + "\"" || '' + "\"")
} else if (value === '$$generate_domain') {
strParsedTemplate = strParsedTemplate.replaceAll(regex, getDomain(service.fqdn) + "\"")
} else if (service.destinationDocker?.network && value === '$$generate_network') {

View File

@@ -409,7 +409,7 @@ export async function traefikConfiguration(request, reply) {
}
}
} else {
if (found.services[oneService].ports) {
if (found.services[oneService].ports && found.services[oneService].ports.length > 0) {
let port = found.services[oneService].ports[0]
const foundPortVariable = serviceSetting.find((a) => a.name.toLowerCase() === 'port')
if (foundPortVariable) {