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
Merge pull request #4945 from nktnet1/feat-env-coolify-resource-uuid
Andras Bacsai55fb4e5d201a
diff --cc app/Jobs/ApplicationDeploymentJob.phpindex d0fc326e97,b52edc1e27..3be186b664--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@@ -923,8 -923,11 +923,11 @@@ class ApplicationDeploymentJob implemenif ($this->application->environment_variables_preview->where('key', 'COOLIFY_BRANCH')->isEmpty()) {$envs->push("COOLIFY_BRANCH=\"{$local_branch}\"");}+ if ($this->application->environment_variables_preview->where('key', 'COOLIFY_RESOURCE_UUID')->isEmpty()) {+ $envs->push("COOLIFY_RESOURCE_UUID={$this->application->uuid}");+ }if ($this->application->environment_variables_preview->where('key', 'COOLIFY_CONTAINER_NAME')->isEmpty()) {- $envs->push("COOLIFY_CONTAINER_NAME=\"{$this->container_name}\"");+ $envs->push("COOLIFY_CONTAINER_NAME={$this->container_name}");}}@@@ -982,8 -985,11 +985,11 @@@if ($this->application->environment_variables->where('key', 'COOLIFY_BRANCH')->isEmpty()) {$envs->push("COOLIFY_BRANCH=\"{$local_branch}\"");}+ if ($this->application->environment_variables->where('key', 'COOLIFY_RESOURCE_UUID')->isEmpty()) {+ $envs->push("COOLIFY_RESOURCE_UUID={$this->application->uuid}");+ }if ($this->application->environment_variables->where('key', 'COOLIFY_CONTAINER_NAME')->isEmpty()) {- $envs->push("COOLIFY_CONTAINER_NAME=\"{$this->container_name}\"");+ $envs->push("COOLIFY_CONTAINER_NAME={$this->container_name}");}}diff --cc bootstrap/helpers/shared.phpindex 24faa62870,55c26ac968..0f3b07cfe0--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@@ -3606,9 -3607,14 +3607,14 @@@ function newParser(Application|Service}}+ // Add COOLIFY_RESOURCE_UUID to environment+ if ($resource->environment_variables->where('key', 'COOLIFY_RESOURCE_UUID')->isEmpty()) {+ $coolifyEnvironments->put('COOLIFY_RESOURCE_UUID', "{$resource->uuid}");+ }+// Add COOLIFY_CONTAINER_NAME to environmentif ($resource->environment_variables->where('key', 'COOLIFY_CONTAINER_NAME')->isEmpty()) {- $coolifyEnvironments->put('COOLIFY_CONTAINER_NAME', "\"{$containerName}\"");+ $coolifyEnvironments->put('COOLIFY_CONTAINER_NAME', "{$containerName}");}if ($isApplication) {