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(application): add option to suppress toast notifications when loading compose file
Andras Bacsai5ddaf3a61fa3
diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.phpindex 03b67dce66..58a35caa03 100644--- a/app/Livewire/Project/Application/General.php+++ b/app/Livewire/Project/Application/General.php@@ -215,25 +215,21 @@ class General extends Component}- public function loadComposeFile($isInit = false)+ public function loadComposeFile($isInit = false, $showToast = true){try {if ($isInit && $this->application->docker_compose_raw) {return;}- // Must reload the application to get the latest database changes- // Why? Not sure, but it works.- // $this->application->refresh();-['parsedServices' => $this->parsedServices, 'initialDockerComposeLocation' => $this->initialDockerComposeLocation] = $this->application->loadComposeFile($isInit);if (is_null($this->parsedServices)) {- $this->dispatch('error', 'Failed to parse your docker-compose file. Please check the syntax and try again.');+ $showToast && $this->dispatch('error', 'Failed to parse your docker-compose file. Please check the syntax and try again.');return;}$this->application->parse();- $this->dispatch('success', 'Docker compose file loaded.');+ $showToast && $this->dispatch('success', 'Docker compose file loaded.');$this->dispatch('compose_loaded');$this->dispatch('refreshStorages');$this->dispatch('refreshEnvs');@@ -275,7 +271,7 @@ class General extends Component$this->dispatch('success', 'Domain generated.');if ($this->application->build_pack === 'dockercompose') {$this->updateServiceEnvironmentVariables();- $this->loadComposeFile();+ $this->loadComposeFile(showToast: false);}return $domain;