An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: proxy connections
Andras Bacsai4ae7e46e8186
diff --git a/app/Http/Livewire/Destination/New/StandaloneDocker.php b/app/Http/Livewire/Destination/New/StandaloneDocker.phpindex 9f928d81ef..75ceb1a0bb 100644--- a/app/Http/Livewire/Destination/New/StandaloneDocker.php+++ b/app/Http/Livewire/Destination/New/StandaloneDocker.php@@ -78,7 +78,7 @@ class StandaloneDocker extends Componentprivate function createNetworkAndAttachToProxy(){- instant_remote_process(['docker network create --attachable ' . $this->network], $this->server, throwError: false);- instant_remote_process(["docker network connect $this->network coolify-proxy"], $this->server, throwError: false);+ $connectProxyToDockerNetworks = connectProxyToNetworks($this->server);+ instant_remote_process($connectProxyToDockerNetworks, $this->server, false);}}diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 37fb197624..e407dabdf1 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -90,7 +90,7 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted$this->server->proxy->status = data_get($foundProxyContainer, 'State.Status');$this->server->save();$connectProxyToDockerNetworks = connectProxyToNetworks($this->server);- instant_remote_process([$connectProxyToDockerNetworks], $this->server, false);+ instant_remote_process($connectProxyToDockerNetworks, $this->server, false);}$foundApplications = [];$foundApplicationPreviews = [];diff --git a/bootstrap/helpers/proxy.php b/bootstrap/helpers/proxy.phpindex 661da1c520..b92509066c 100644--- a/bootstrap/helpers/proxy.php+++ b/bootstrap/helpers/proxy.php@@ -20,11 +20,10 @@ function connectProxyToNetworks(Server $server) {$commands = $networks->map(function ($network) {return ["echo '####### Connecting coolify-proxy to $network network...'",- "docker network ls --format '{{.Name}}' | grep '^$network$' >/dev/null 2>&1 || docker network create --attachable $network > /dev/null 2>&1",+ "docker network ls --format '{{.Name}}' | grep '^$network$' || docker network create --attachable $network","docker network connect $network coolify-proxy >/dev/null 2>&1 || true",];});-return $commands->flatten();}function generate_default_proxy_configuration(Server $server)diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex 11ded05428..e13a9ce3ea 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -83,6 +83,7 @@ function refreshSession(?Team $team = null): voidfunction handleError(?Throwable $error = null, ?Livewire\Component $livewire = null, ?string $customErrorMessage = null){ray('handleError');+ ray($error);if ($error instanceof Throwable) {$message = $error->getMessage();} else {@@ -100,6 +101,7 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = nif (isset($livewire)) {return $livewire->emit('error', $message);}+throw new RuntimeException($message);}function general_error_handler(Throwable $err, Livewire\Component $that = null, $isJson = false, $customErrorMessage = null): mixed