fix: compose magic

This commit is contained in:
Andras Bacsai
2023-10-04 11:32:27 +02:00
parent e0b175ab07
commit 47e4126dca
3 changed files with 760 additions and 3 deletions

View File

@@ -31,8 +31,6 @@ class Index extends Component
$this->service = Service::whereUuid($this->parameters['service_uuid'])->firstOrFail();
$this->applications = $this->service->applications->sort();
$this->databases = $this->service->databases->sort();
ray($this->applications);
ray($this->databases);
}
public function saveCompose($raw)
{

View File

@@ -386,7 +386,10 @@ class Service extends BaseModel
if ($key->startsWith('SERVICE_FQDN')) {
if (is_null(data_get($savedService, 'fqdn'))) {
$fqdn = generateFqdn($this->server, $containerName);
if (substr_count($key->value(), '_') === 2 && $key->contains("=")) {
if (substr_count($key->value(), '_') === 2) {
if (is_null($value)) {
$value = Str::of('/');
}
$path = $value->value();
if ($generatedServiceFQDNS->count() > 0) {
$alreadyGenerated = $generatedServiceFQDNS->has($key->value());