| @@ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
| 	"name": "coolify", | 	"name": "coolify", | ||||||
| 	"description": "An open-source & self-hostable Heroku / Netlify alternative.", | 	"description": "An open-source & self-hostable Heroku / Netlify alternative.", | ||||||
| 	"version": "2.4.6", | 	"version": "2.4.7", | ||||||
| 	"license": "AGPL-3.0", | 	"license": "AGPL-3.0", | ||||||
| 	"scripts": { | 	"scripts": { | ||||||
| 		"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev", | 		"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev", | ||||||
|   | |||||||
| @@ -236,9 +236,15 @@ export async function stopCoolifyProxy( | |||||||
| export async function configureNetworkCoolifyProxy(engine: string): Promise<void> { | export async function configureNetworkCoolifyProxy(engine: string): Promise<void> { | ||||||
| 	const host = getEngine(engine); | 	const host = getEngine(engine); | ||||||
| 	const destinations = await db.prisma.destinationDocker.findMany({ where: { engine } }); | 	const destinations = await db.prisma.destinationDocker.findMany({ where: { engine } }); | ||||||
|  | 	const { stdout: networks } = await asyncExecShell( | ||||||
|  | 		`DOCKER_HOST="${host}" docker ps -a --filter name=coolify-haproxy --format '{{json .Networks}}'` | ||||||
|  | 	); | ||||||
|  | 	const configuredNetworks = networks.replace(/"/g, '').replace('\n', '').split(','); | ||||||
| 	for (const destination of destinations) { | 	for (const destination of destinations) { | ||||||
| 		await asyncExecShell( | 		if (!configuredNetworks.includes(destination.network)) { | ||||||
| 			`DOCKER_HOST="${host}" docker network connect ${destination.network} coolify-haproxy` | 			await asyncExecShell( | ||||||
| 		); | 				`DOCKER_HOST="${host}" docker network connect ${destination.network} coolify-haproxy` | ||||||
|  | 			); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai