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: improve build server functionalities
Andras Bacsai5c72541044a7
diff --git a/app/Actions/Proxy/CheckProxy.php b/app/Actions/Proxy/CheckProxy.phpindex 79989f05be..b1fb6a3cb0 100644--- a/app/Actions/Proxy/CheckProxy.php+++ b/app/Actions/Proxy/CheckProxy.php@@ -22,7 +22,6 @@ class CheckProxy}$proxyType = $server->proxyType();if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) {- ray('Not starting proxy');return false;}['uptime' => $uptime, 'error' => $error] = $server->validateConnection();diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.phpindex 3e41708d4a..92a5e5b560 100644--- a/app/Actions/Proxy/StartProxy.php+++ b/app/Actions/Proxy/StartProxy.php@@ -15,7 +15,7 @@ class StartProxy{try {$proxyType = $server->proxyType();- if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) {+ if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop || $server->isBuildServer()) {return 'OK';}$commands = collect([]);diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.phpindex c1dcd34ce8..44f016aca7 100644--- a/app/Livewire/Server/Form.php+++ b/app/Livewire/Server/Form.php@@ -58,6 +58,12 @@ class Form extends Component$this->server->refresh();$this->server->settings->refresh();}+ public function updatedServerSettingsIsBuildServer()+ {+ $this->dispatch('serverInstalled');+ $this->dispatch('serverRefresh');+ $this->dispatch('proxyStatusUpdated');+ }public function instantSave(){try {diff --git a/app/Livewire/Server/ValidateAndInstall.php b/app/Livewire/Server/ValidateAndInstall.phpindex b148fe2c4b..aef7b800c6 100644--- a/app/Livewire/Server/ValidateAndInstall.php+++ b/app/Livewire/Server/ValidateAndInstall.php@@ -129,6 +129,9 @@ class ValidateAndInstall extends Component}}+ if ($this->server->isBuildServer()) {+ return;+ }$this->dispatch('startProxy');}public function render()diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.phpindex 5f2975286e..6efe08c52f 100644--- a/resources/views/livewire/server/form.blade.php+++ b/resources/views/livewire/server/form.blade.php@@ -72,7 +72,7 @@<div class="w-64">@if ($server->isFunctional())@if (!$server->isLocalhost())- <x-forms.checkbox instantSave disabled id="server.settings.is_build_server"+ <x-forms.checkbox instantSave id="server.settings.is_build_server"label="Use it as a build server?" /><div class="flex items-center gap-1 pt-6"><h3 class="">Cloudflare Tunnels@@ -87,28 +87,32 @@<livewire:server.configure-cloudflare-tunnels :server_id="$server->id" /></x-modal-input>@endif- <h3 class="pt-6">Swarm <span class="text-xs text-neutral-500">(experimental)</span></h3>- <div class="pb-4">Read the docs <a class='underline dark:text-white'- href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>.- </div>- @if ($server->settings->is_swarm_worker)- <x-forms.checkbox disabled instantSave type="checkbox" id="server.settings.is_swarm_manager"- helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."- label="Is it a Swarm Manager?" />- @else- <x-forms.checkbox instantSave type="checkbox" id="server.settings.is_swarm_manager"- helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."- label="Is it a Swarm Manager?" />- @endif+ @if (!$server->isBuildServer())+ <h3 class="pt-6">Swarm <span class="text-xs text-neutral-500">(experimental)</span></h3>+ <div class="pb-4">Read the docs <a class='underline dark:text-white'+ href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>.+ </div>+ @if ($server->settings->is_swarm_worker)+ <x-forms.checkbox disabled instantSave type="checkbox"+ id="server.settings.is_swarm_manager"+ helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."+ label="Is it a Swarm Manager?" />+ @else+ <x-forms.checkbox instantSave type="checkbox" id="server.settings.is_swarm_manager"+ helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."+ label="Is it a Swarm Manager?" />+ @endif- @if ($server->settings->is_swarm_manager)- <x-forms.checkbox disabled instantSave type="checkbox" id="server.settings.is_swarm_worker"- helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."- label="Is it a Swarm Worker?" />- @else- <x-forms.checkbox instantSave type="checkbox" id="server.settings.is_swarm_worker"- helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."- label="Is it a Swarm Worker?" />+ @if ($server->settings->is_swarm_manager)+ <x-forms.checkbox disabled instantSave type="checkbox"+ id="server.settings.is_swarm_worker"+ helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."+ label="Is it a Swarm Worker?" />+ @else+ <x-forms.checkbox instantSave type="checkbox" id="server.settings.is_swarm_worker"+ helper="For more information, please read the documentation <a class='dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/swarm' target='_blank'>here</a>."+ label="Is it a Swarm Worker?" />+ @endif@endif@endif@else@@ -132,7 +136,7 @@@if ($server->isFunctional())<h3 class="py-4">Settings</h3>- <div class="flex gap-2 flex-wrap sm:flex-nowrap">+ <div class="flex flex-wrap gap-2 sm:flex-nowrap"><x-forms.input id="cleanup_after_percentage" label="Disk cleanup threshold (%)" requiredhelper="The disk cleanup task will run when the disk usage exceeds this threshold." /><x-forms.input id="server.settings.concurrent_builds" label="Number of concurrent builds" requireddiff --git a/resources/views/livewire/server/validate-and-install.blade.php b/resources/views/livewire/server/validate-and-install.blade.phpindex 8d50c36083..fc499f98fc 100644--- a/resources/views/livewire/server/validate-and-install.blade.php+++ b/resources/views/livewire/server/validate-and-install.blade.php@@ -99,26 +99,28 @@@else<div class="w-64"><x-loading text="Minimum Docker version:" /></div>@endisset- @if ($proxy_started)- <div class="flex w-64 gap-2">Proxy started: <svg class="w-5 h-5 text-success" viewBox="0 0 256 256"- xmlns="http://www.w3.org/2000/svg">- <g fill="currentColor">- <path- d="m237.66 85.26l-128.4 128.4a8 8 0 0 1-11.32 0l-71.6-72a8 8 0 0 1 0-11.31l24-24a8 8 0 0 1 11.32 0l36.68 35.32a8 8 0 0 0 11.32 0l92.68-91.32a8 8 0 0 1 11.32 0l24 23.6a8 8 0 0 1 0 11.31"- opacity=".2" />- <path- d="m243.28 68.24l-24-23.56a16 16 0 0 0-22.58 0L104 136l-.11-.11l-36.64-35.27a16 16 0 0 0-22.57.06l-24 24a16 16 0 0 0 0 22.61l71.62 72a16 16 0 0 0 22.63 0l128.4-128.38a16 16 0 0 0-.05-22.67M103.62 208L32 136l24-24l.11.11l36.64 35.27a16 16 0 0 0 22.52 0L208.06 56L232 79.6Z" />- </g>- </svg></div>- @else- @if ($error)- <div class="flex w-64 gap-2">Proxy started: <svg class="w-5 h-5 text-error"+ @if (!$server->isBuildServer())+ @if ($proxy_started)+ <div class="flex w-64 gap-2">Proxy started: <svg class="w-5 h-5 text-success"viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">- <path fill="currentColor"- d="M208.49 191.51a12 12 0 0 1-17 17L128 145l-63.51 63.49a12 12 0 0 1-17-17L111 128L47.51 64.49a12 12 0 0 1 17-17L128 111l63.51-63.52a12 12 0 0 1 17 17L145 128Z" />+ <g fill="currentColor">+ <path+ d="m237.66 85.26l-128.4 128.4a8 8 0 0 1-11.32 0l-71.6-72a8 8 0 0 1 0-11.31l24-24a8 8 0 0 1 11.32 0l36.68 35.32a8 8 0 0 0 11.32 0l92.68-91.32a8 8 0 0 1 11.32 0l24 23.6a8 8 0 0 1 0 11.31"+ opacity=".2" />+ <path+ d="m243.28 68.24l-24-23.56a16 16 0 0 0-22.58 0L104 136l-.11-.11l-36.64-35.27a16 16 0 0 0-22.57.06l-24 24a16 16 0 0 0 0 22.61l71.62 72a16 16 0 0 0 22.63 0l128.4-128.38a16 16 0 0 0-.05-22.67M103.62 208L32 136l24-24l.11.11l36.64 35.27a16 16 0 0 0 22.52 0L208.06 56L232 79.6Z" />+ </g></svg></div>@else- <div class="w-64"><x-loading text="Proxy started:" /></div>+ @if ($error)+ <div class="flex w-64 gap-2">Proxy started: <svg class="w-5 h-5 text-error"+ viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">+ <path fill="currentColor"+ d="M208.49 191.51a12 12 0 0 1-17 17L128 145l-63.51 63.49a12 12 0 0 1-17-17L111 128L47.51 64.49a12 12 0 0 1 17-17L128 111l63.51-63.52a12 12 0 0 1 17 17L145 128Z" />+ </svg></div>+ @else+ <div class="w-64"><x-loading text="Proxy started:" /></div>+ @endif@endif@endif@else