fix: Only reconfigure coolify proxy if its missconfigured
This commit is contained in:
parent
95832d34f7
commit
98dbf3d8a5
@ -70,10 +70,22 @@ async function main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const versions = ['2.9.2', '2.9.3'];
|
if (settings.isTraefikUsed) {
|
||||||
if (versions.includes(version)) {
|
|
||||||
// Force stop Coolify Proxy, as it had a bug in < 2.9.2. TrustProxy + api.insecure
|
// Force stop Coolify Proxy, as it had a bug in < 2.9.2. TrustProxy + api.insecure
|
||||||
try {
|
try {
|
||||||
|
const { stdout } = await asyncExecShell(
|
||||||
|
`docker inspect coolify-proxy --format '{{json .Config.Cmd}}'`
|
||||||
|
);
|
||||||
|
if (
|
||||||
|
!stdout
|
||||||
|
.replaceAll('[', '')
|
||||||
|
.replaceAll(']', '')
|
||||||
|
.replaceAll('"', '')
|
||||||
|
.replace('\n', '')
|
||||||
|
.split(',')
|
||||||
|
.includes('--entrypoints.web.forwardedHeaders.insecure=true')
|
||||||
|
) {
|
||||||
|
console.log('Reconfiguring Coolify Proxy (Traefik)...');
|
||||||
await asyncExecShell(`docker stop -t 0 coolify-proxy && docker rm coolify-proxy`);
|
await asyncExecShell(`docker stop -t 0 coolify-proxy && docker rm coolify-proxy`);
|
||||||
const { stdout: Config } = await asyncExecShell(
|
const { stdout: Config } = await asyncExecShell(
|
||||||
`docker network inspect bridge --format '{{json .IPAM.Config }}'`
|
`docker network inspect bridge --format '{{json .IPAM.Config }}'`
|
||||||
@ -103,6 +115,7 @@ async function main() {
|
|||||||
--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web \
|
--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web \
|
||||||
--log.level=error`
|
--log.level=error`
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user