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 directory creation issue in LocalFileVolume.php and parseDockerComposeFile()
Andras Bacsai6dd86eec30b5
diff --git a/app/Models/LocalFileVolume.php b/app/Models/LocalFileVolume.phpindex f426e40a06..caeab8915f 100644--- a/app/Models/LocalFileVolume.php+++ b/app/Models/LocalFileVolume.php@@ -39,7 +39,7 @@ class LocalFileVolume extends BaseModelif (!$fileVolume->is_directory && $isDir == 'NOK') {$content = base64_encode($content);$commands->push("echo '$content' | base64 -d > $path");- } else if ($isDir == 'NOK' && $fileVolume->is_directory) {+ } else if ($isDir == 'NOK' && $fileVolume->is_directory) {$commands->push("mkdir -p $path > /dev/null 2>&1 || true");}ray($commands->toArray());diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex 7ffc6a72c6..10d8f313be 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -782,14 +782,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal$source = data_get_str($volume, 'source');$target = data_get_str($volume, 'target');$content = data_get($volume, 'content');- $isDirectory = (bool) data_get($volume, 'isDirectory', false);+ $isDirectory = (bool) data_get($volume, 'isDirectory', false) || (bool) data_get($volume, 'is_directory', false);$foundConfig = $savedService->fileStorages()->whereMountPath($target)->first();if ($foundConfig) {$contentNotNull = data_get($foundConfig, 'content');if ($contentNotNull) {$content = $contentNotNull;}- $isDirectory = (bool) data_get($foundConfig, 'is_directory');+ $isDirectory = (bool) data_get($volume, 'isDirectory', false) || (bool) data_get($volume, 'is_directory', false);}}if ($type->value() === 'bind') {@@ -1054,6 +1054,8 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = faldata_set($service, 'container_name', $containerName);data_forget($service, 'volumes.*.content');data_forget($service, 'volumes.*.isDirectory');+ data_forget($service, 'volumes.*.is_directory');+// Remove unnecessary variables from service.environment// $withoutServiceEnvs = collect([]);// collect(data_get($service, 'environment'))->each(function ($value, $key) use ($withoutServiceEnvs) {