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: force load services from cdn on reload list
Andras Bacsaia6a0cb928ab4
diff --git a/app/Livewire/Project/New/Select.php b/app/Livewire/Project/New/Select.phpindex c56290a06f..2b5ef9eca8 100644--- a/app/Livewire/Project/New/Select.php+++ b/app/Livewire/Project/New/Select.php@@ -91,7 +91,7 @@ class Select extends Component});} else {$this->search = null;- $this->allServices = get_service_templates();+ $this->allServices = get_service_templates($force);$this->services = $this->allServices->filter(function ($service, $key) {return str_contains(strtolower($key), strtolower($this->search));});diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex ee5a52d566..c8c8ee4e95 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -465,25 +465,24 @@ function sslip(Server $server)return "http://{$server->ip}.sslip.io";}-function get_service_templates()+function get_service_templates(bool $force = false): Collection{- // if (isDev()) {- // $services = File::get(base_path('templates/service-templates.json'));- // $services = collect(json_decode($services))->sortKeys();- // } else {- // try {- // $response = Http::retry(3, 50)->get(config('constants.services.official'));- // if ($response->failed()) {- // return collect([]);- // }- // $services = $response->json();- // $services = collect($services)->sortKeys();- // } catch (\Throwable $e) {- // $services = collect([]);- // }- // }- $services = File::get(base_path('templates/service-templates.json'));- return collect(json_decode($services))->sortKeys();+ if ($force) {+ try {+ $response = Http::retry(3, 50)->get(config('constants.services.official'));+ if ($response->failed()) {+ return collect([]);+ }+ $services = $response->json();+ return collect($services);+ } catch (\Throwable $e) {+ $services = File::get(base_path('templates/service-templates.json'));+ return collect(json_decode($services))->sortKeys();+ }+ } else {+ $services = File::get(base_path('templates/service-templates.json'));+ return collect(json_decode($services))->sortKeys();+ }}function getResourceByUuid(string $uuid, ?int $teamId = null)