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:new parser only in dev
Andras Bacsai5394223f6bb6
diff --git a/app/Models/Application.php b/app/Models/Application.phpindex e328607d8b..db76d07ec8 100644--- a/app/Models/Application.php+++ b/app/Models/Application.php@@ -1106,10 +1106,11 @@ class Application extends BaseModelif (! $this->docker_compose_raw) {return collect([]);}+ if (isDev()) {+ $compose = dockerComposeParserForApplications($this);- // $compose = dockerComposeParserForApplications($this);-- // return $compose;+ return $compose;+ }$isNew = false;$isSameDockerComposeFile = false;diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex 427d3f14d5..3d5346d47c 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -1167,10 +1167,23 @@ function dockerComposeParserForApplications(Application $application): Collectio]);}}++ // ray($environment);$environment = $application->environment_variables()->where('application_id', $application->id)->get()->mapWithKeys(function ($item) {return [$item['key'] => $item['value']];});+ // if ($environment?->count() > 0) {+ // $environment = $environment->map(function ($value, $key) use ($application) {+ // $found = $application->environment_variables()->where('key', $key)->where('application_id', $application->id)->first();+ // if ($found) {+ // $value = $found->value;+ // }++ // return $value;+ // });+ // }+// Labels$fqdns = collect([]);if ($application?->serviceType()) {diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.phpindex 4d242fc6b5..36bf5b461f 100644--- a/resources/views/livewire/project/application/general.blade.php+++ b/resources/views/livewire/project/application/general.blade.php@@ -254,9 +254,11 @@helper="You need to modify the docker compose file." monacoEditorLanguage="yaml"useMonacoEditor />@else- {{-- <x-forms.textarea rows="10" readonly id="application.docker_compose_raw"- label="Docker Compose Content (raw)" helper="You need to modify the docker compose file."- monacoEditorLanguage="yaml" useMonacoEditor /> --}}+ @if (isDev())+ <x-forms.textarea rows="10" readonly id="application.docker_compose_raw"+ label="Docker Compose Content (raw)" helper="You need to modify the docker compose file."+ monacoEditorLanguage="yaml" useMonacoEditor />+ @endif<x-forms.textarea rows="10" readonly id="application.docker_compose"label="Docker Compose Content" helper="You need to modify the docker compose file."monacoEditorLanguage="yaml" useMonacoEditor />