add env vars
This commit is contained in:
@@ -905,6 +905,19 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$envs->push("COOLIFY_CONTAINER_NAME={$this->container_name}");
|
||||
}
|
||||
}
|
||||
if ($this->application->environment_variables_preview->where('key', 'COOLIFY_APP_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_APP_NAME={$this->application->name}");
|
||||
}
|
||||
if ($this->application->environment_variables_preview->where('key', 'COOLIFY_SERVER_IP')->isEmpty()) {
|
||||
$envs->push("COOLIFY_SERVER_IP={$this->application->destination->server->ip}");
|
||||
}
|
||||
if ($this->application->environment_variables_preview->where('key', 'COOLIFY_ENVIRONMENT_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_ENVIRONMENT_NAME={$this->application->environment->name}");
|
||||
}
|
||||
if ($this->application->environment_variables_preview->where('key', 'COOLIFY_PROJECT_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_PROJECT_NAME={$this->application->project()->name}");
|
||||
}
|
||||
|
||||
foreach ($sorted_environment_variables_preview as $env) {
|
||||
$real_value = $env->real_value;
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
@@ -953,6 +966,19 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$envs->push("COOLIFY_CONTAINER_NAME={$this->container_name}");
|
||||
}
|
||||
}
|
||||
if ($this->application->environment_variables->where('key', 'COOLIFY_APP_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_APP_NAME={$this->application->name}");
|
||||
}
|
||||
if ($this->application->environment_variables->where('key', 'COOLIFY_SERVER_IP')->isEmpty()) {
|
||||
$envs->push("COOLIFY_SERVER_IP={$this->application->destination->server->ip}");
|
||||
}
|
||||
if ($this->application->environment_variables->where('key', 'COOLIFY_ENVIRONMENT_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_ENVIRONMENT_NAME={$this->application->environment->name}");
|
||||
}
|
||||
if ($this->application->environment_variables->where('key', 'COOLIFY_PROJECT_NAME')->isEmpty()) {
|
||||
$envs->push("COOLIFY_PROJECT_NAME={$this->application->project()->name}");
|
||||
}
|
||||
|
||||
foreach ($sorted_environment_variables as $env) {
|
||||
$real_value = $env->real_value;
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
|
Reference in New Issue
Block a user