Merge pull request #6170 from mindedtech/Add-SERVICE_NAME-variable-for-docker-compose-services

Add SERVICE_NAME variable for docker compose services
This commit is contained in:
Andras Bacsai
2025-09-11 13:06:10 +02:00
committed by GitHub
6 changed files with 67 additions and 29 deletions

View File

@@ -257,7 +257,7 @@ class All extends Component
{
$count = 0;
foreach ($variables as $key => $value) {
if (str($key)->startsWith('SERVICE_FQDN') || str($key)->startsWith('SERVICE_URL')) {
if (str($key)->startsWith('SERVICE_FQDN') || str($key)->startsWith('SERVICE_URL') || str($key)->startsWith('SERVICE_NAME')) {
continue;
}
$method = $isPreview ? 'environment_variables_preview' : 'environment_variables';

View File

@@ -128,7 +128,7 @@ class Show extends Component
public function checkEnvs()
{
$this->isDisabled = false;
if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL')) {
if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL') || str($this->env->key)->startsWith('SERVICE_NAME')) {
$this->isDisabled = true;
}
if ($this->env->is_shown_once) {