fix: duplicated generated fqdns are now working
This commit is contained in:
parent
8cff40fdd4
commit
39082541ff
@ -944,11 +944,10 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
|
|
||||||
if (!$isDatabase) {
|
if (!$isDatabase) {
|
||||||
if ($savedService->fqdn) {
|
if ($savedService->fqdn) {
|
||||||
$fqdn = $savedService->fqdn . ',' . $fqdn;
|
data_set($savedService, 'fqdn', $savedService->fqdn . ',' . $fqdn);
|
||||||
} else {
|
} else {
|
||||||
$fqdn = $fqdn;
|
data_set($savedService, 'fqdn', $fqdn);
|
||||||
}
|
}
|
||||||
$savedService->fqdn = $fqdn;
|
|
||||||
$savedService->save();
|
$savedService->save();
|
||||||
}
|
}
|
||||||
EnvironmentVariable::create([
|
EnvironmentVariable::create([
|
||||||
@ -960,7 +959,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Caddy needs exact port in some cases.
|
// Caddy needs exact port in some cases.
|
||||||
|
|
||||||
if ($predefinedPort && !$key->endsWith("_{$predefinedPort}")) {
|
if ($predefinedPort && !$key->endsWith("_{$predefinedPort}")) {
|
||||||
if ($resource->server->proxyType() === 'CADDY') {
|
if ($resource->server->proxyType() === 'CADDY') {
|
||||||
$env = EnvironmentVariable::where([
|
$env = EnvironmentVariable::where([
|
||||||
@ -1459,13 +1457,13 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
])->first();
|
])->first();
|
||||||
$value = Str::of(replaceVariables($value));
|
$value = Str::of(replaceVariables($value));
|
||||||
$key = $value;
|
$key = $value;
|
||||||
|
|
||||||
if ($value->startsWith('SERVICE_')) {
|
if ($value->startsWith('SERVICE_')) {
|
||||||
$foundEnv = EnvironmentVariable::where([
|
$foundEnv = EnvironmentVariable::where([
|
||||||
'key' => $key,
|
'key' => $key,
|
||||||
'application_id' => $resource->id,
|
'application_id' => $resource->id,
|
||||||
])->first();
|
])->first();
|
||||||
['command' => $command, 'forService' => $forService, 'generatedValue' => $generatedValue, 'port' => $port] = parseEnvVariable($value);
|
['command' => $command, 'forService' => $forService, 'generatedValue' => $generatedValue, 'port' => $port] = parseEnvVariable($value);
|
||||||
|
ray($command, $generatedValue);
|
||||||
if (!is_null($command)) {
|
if (!is_null($command)) {
|
||||||
if ($command?->value() === 'FQDN' || $command?->value() === 'URL') {
|
if ($command?->value() === 'FQDN' || $command?->value() === 'URL') {
|
||||||
if (Str::lower($forService) === $serviceName) {
|
if (Str::lower($forService) === $serviceName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user