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
Refactor compose file generation and add link to documentation
Andras Bacsai1defed27a02a
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex 0dedfd5968..b9c60605f9 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -1077,7 +1077,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncryptedprivate function generate_compose_file(){$ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array;-+ $onlyPort = null;+ if (count($ports) > 0) {+ $onlyPort = $ports[0];+ }$persistent_storages = $this->generate_local_persistent_volumes();$volume_names = $this->generate_local_persistent_volumes_only_volume_names();$environment_variables = $this->generate_environment_variables($ports);@@ -1088,6 +1091,25 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted$labels = $labels->filter(function ($value, $key) {return !Str::startsWith($value, 'coolify.');});+ $found_caddy_labels = $labels->filter(function ($value, $key) {+ return Str::startsWith($value, 'caddy_');+ });+ if ($found_caddy_labels->count() === 0) {+ if ($this->pull_request_id !== 0) {+ $domains = str(data_get($this->preview, 'fqdn'))->explode(',');+ } else {+ $domains = str(data_get($this->application, 'fqdn'))->explode(',');+ }+ $labels = $labels->merge(fqdnLabelsForCaddy(+ network: $this->application->destination->network,+ uuid: $this->application->uuid,+ domains: $domains,+ onlyPort: $onlyPort,+ is_force_https_enabled: $this->application->isForceHttpsEnabled(),+ is_gzip_enabled: $this->application->isGzipEnabled(),+ is_stripprefix_enabled: $this->application->isStripprefixEnabled()+ ));+ }$this->application->custom_labels = base64_encode($labels->implode("\n"));$this->application->save();} else {diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.phpindex 7c65997927..ba3909739e 100644--- a/resources/views/livewire/server/proxy.blade.php+++ b/resources/views/livewire/server/proxy.blade.php@@ -13,7 +13,7 @@<x-forms.button type="submit">Save</x-forms.button></div>- <div class="pb-4 ">Before switching proxies, please read <a>this</a>.</div>+ <div class="pb-4 ">Before switching proxies, please read <a href="https://coolify.io/docs/server/switching-proxies">this</a>.</div>@if ($server->proxyType() === 'TRAEFIK_V2')<div class="pb-4">Traefik v2</div>@elseif ($server->proxyType() === 'CADDY')