Code: small refactor, HA template: TCP backend fix
gitea/docker-discover/pipeline/head This commit looks good
Details
gitea/docker-discover/pipeline/head This commit looks good
Details
This commit is contained in:
parent
762fbffe3c
commit
a437b28cb0
8
index.js
8
index.js
|
@ -33,10 +33,6 @@ async function updateProxy(firstRun) {
|
|||
};
|
||||
}
|
||||
|
||||
function sortFn(a, b) {
|
||||
return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
|
||||
}
|
||||
|
||||
const workers = [];
|
||||
const managers = [];
|
||||
|
||||
|
@ -85,6 +81,10 @@ async function updateProxy(firstRun) {
|
|||
}
|
||||
}
|
||||
|
||||
function sortFn(a, b) {
|
||||
return a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
|
||||
}
|
||||
|
||||
for (const list of [workers, managers, http, tcp, udp])
|
||||
list.sort(sortFn);
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ backend {{name}}
|
|||
|
||||
{{#each tcp}}
|
||||
listen {{name}}:{{port}}
|
||||
bind :{{port}}
|
||||
mode tcp
|
||||
{{#each ../workers}}
|
||||
server {{name}} {{address}}:{{../port}} check
|
||||
|
|
Reference in New Issue