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 start (if not proxy defined, use Traefik)
Andras Bacsai157da798ddc3
diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.phpindex 343d2328ef..37c9c492e2 100644--- a/app/Actions/Proxy/StartProxy.php+++ b/app/Actions/Proxy/StartProxy.php@@ -2,6 +2,8 @@namespace App\Actions\Proxy;+use App\Enums\ProxyStatus;+use App\Enums\ProxyTypes;use App\Models\Server;use Illuminate\Support\Str;use Spatie\Activitylog\Models\Activity;@@ -10,6 +12,15 @@ class StartProxy{public function __invoke(Server $server, bool $async = true): Activity|string{+ $proxyType = data_get($server,'proxy.type');+ if ($proxyType === 'none') {+ return 'OK';+ }+ if (is_null($proxyType)) {+ $server->proxy->type = ProxyTypes::TRAEFIK_V2->value;+ $server->proxy->status = ProxyStatus::EXITED->value;+ $server->save();+ }$proxy_path = get_proxy_path();$networks = collect($server->standaloneDockers)->map(function ($docker) {return $docker['network'];@@ -38,12 +49,12 @@ class StartProxy"echo '####### Pulling docker image...'",'docker compose pull',"echo '####### Stopping existing coolify-proxy...'",- 'docker compose down -v --remove-orphans',- "command -v lsof >/dev/null && lsof -nt -i:80 | xargs -r kill -9",- "command -v lsof >/dev/null && lsof -nt -i:443 | xargs -r kill -9",- "command -v fuser >/dev/null && fuser -k 80/tcp",- "command -v fuser >/dev/null && fuser -k 443/tcp",+ "docker compose down -v --remove-orphans > /dev/null 2>&1 || true","command -v fuser >/dev/null || command -v lsof >/dev/null || echo '####### Could not kill existing processes listening on port 80 & 443. Please stop the process holding these ports...'",+ "command -v lsof >/dev/null && lsof -nt -i:80 | xargs -r kill -9 || true",+ "command -v lsof >/dev/null && lsof -nt -i:443 | xargs -r kill -9 || true",+ "command -v fuser >/dev/null && fuser -k 80/tcp || true",+ "command -v fuser >/dev/null && fuser -k 443/tcp || true","systemctl disable nginx > /dev/null 2>&1 || true","systemctl disable apache2 > /dev/null 2>&1 || true","systemctl disable apache > /dev/null 2>&1 || true",diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 100c33e51c..6d5feb5ce7 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -41,17 +41,15 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted}private function checkServerConnection() {- ray("Checking server connection to {$this->server->ip}");$uptime = instant_remote_process(['uptime'], $this->server, false);if (!is_null($uptime)) {- ray('Server is up');return true;}}public function handle(): void{try {- ray()->clearAll();+ // ray()->clearAll();$serverUptimeCheckNumber = 0;$serverUptimeCheckNumberMax = 5;while (true) {@@ -216,12 +214,10 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted$isPR = Str::startsWith(data_get($value, 'Name'), "/$uuid");$isPR = Str::contains(data_get($value, 'Name'), "-pr-");if ($isPR) {- ray('is pr');return false;}return $value;})->first();- ray($foundContainer);if ($foundContainer) {$containerStatus = data_get($foundContainer, 'State.Status');$databaseStatus = data_get($application, 'status');diff --git a/config/sentry.php b/config/sentry.phpindex 9e80be3b75..bc82840f58 100644--- a/config/sentry.php+++ b/config/sentry.php@@ -7,7 +7,7 @@ return [// The release version of your application// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))- 'release' => '4.0.0-beta.39',+ 'release' => '4.0.0-beta.40',// When left empty or `null` the Laravel environment will be used'environment' => config('app.env'),diff --git a/config/version.php b/config/version.phpindex 8d1293e1fa..5e04a22e34 100644--- a/config/version.php+++ b/config/version.php@@ -1,3 +1,3 @@<?php-return '4.0.0-beta.39';+return '4.0.0-beta.40';diff --git a/resources/views/livewire/project/shared/destination.blade.php b/resources/views/livewire/project/shared/destination.blade.phpindex c5b2dd03a6..d7aa0b09ec 100644--- a/resources/views/livewire/project/shared/destination.blade.php+++ b/resources/views/livewire/project/shared/destination.blade.php@@ -3,6 +3,6 @@<div class="">The destination server / network where your application will be deployed to.</div><div class="py-4 "><p>Server: {{ data_get($destination, 'server.name') }}</p>- <p>Destination Network: {{ $destination->network }}</p>+ <p>Destination Network: {{ data_get($destination, 'server.network') }}</p></div></div>diff --git a/versions.json b/versions.jsonindex afa5d8f403..a922e01d20 100644--- a/versions.json+++ b/versions.json@@ -4,7 +4,7 @@"version": "3.12.36"},"v4": {- "version": "4.0.0-beta.39"+ "version": "4.0.0-beta.40"}}}