Merge pull request #442 from coollabsio/next
fix: Only reconfigure coolify proxy if its missconfigured
This commit is contained in:
		| @@ -70,10 +70,22 @@ async function main() { | ||||
| 			} | ||||
| 		}); | ||||
| 	} | ||||
| 	const versions = ['2.9.2', '2.9.3']; | ||||
| 	if (versions.includes(version)) { | ||||
| 	if (settings.isTraefikUsed) { | ||||
| 		// Force stop Coolify Proxy, as it had a bug in < 2.9.2. TrustProxy + api.insecure | ||||
| 		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`); | ||||
| 				const { stdout: Config } = await asyncExecShell( | ||||
| 					`docker network inspect bridge --format '{{json .IPAM.Config }}'` | ||||
| @@ -103,6 +115,7 @@ async function main() { | ||||
| 				--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web \ | ||||
| 				--log.level=error` | ||||
| 				); | ||||
| 			} | ||||
| 		} catch (error) { | ||||
| 			console.log(error); | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai