mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
add env vars
This commit is contained in:
parent
d8d821e7a9
commit
49a53236b0
@ -905,6 +905,19 @@ private function save_environment_variables()
|
||||
$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 @@ private function save_environment_variables()
|
||||
$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') {
|
||||
|
Loading…
Reference in New Issue
Block a user