mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
refactor: Update dockerComposeParser to use YAML data from $yaml instead of $compose
This commit is contained in:
parent
af1b479d73
commit
6fbdfee3e7
@ -1100,10 +1100,10 @@ public function dockerComposeParser(int $pull_request_id = 0, ?int $preview_id =
|
||||
}
|
||||
$services = data_get($yaml, 'services', collect([]));
|
||||
$topLevel = collect([
|
||||
'volumes' => collect(data_get($compose, 'volumes', [])),
|
||||
'networks' => collect(data_get($compose, 'networks', [])),
|
||||
'configs' => collect(data_get($compose, 'configs', [])),
|
||||
'secrets' => collect(data_get($compose, 'secrets', [])),
|
||||
'volumes' => collect(data_get($yaml, 'volumes', [])),
|
||||
'networks' => collect(data_get($yaml, 'networks', [])),
|
||||
'configs' => collect(data_get($yaml, 'configs', [])),
|
||||
'secrets' => collect(data_get($yaml, 'secrets', [])),
|
||||
]);
|
||||
|
||||
// If there are predefined volumes, make sure they are not null
|
||||
@ -1475,7 +1475,6 @@ public function dockerComposeParser(int $pull_request_id = 0, ?int $preview_id =
|
||||
$environment = $environment->filter(function ($value, $key) {
|
||||
return ! str($key)->startsWith('SERVICE_FQDN') && ! str($key)->startsWith('SERVICE_URL');
|
||||
});
|
||||
ray($environment);
|
||||
|
||||
// Labels
|
||||
$fqdns = collect([]);
|
||||
|
@ -54,7 +54,12 @@
|
||||
],
|
||||
'networks' => [
|
||||
'default' => [
|
||||
'ipv4_address' => '127.0.0.1',
|
||||
'name' => 'something',
|
||||
'external' => true,
|
||||
],
|
||||
'noinet' => [
|
||||
'driver' => 'bridge',
|
||||
'internal' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
@ -91,7 +96,8 @@
|
||||
expect($output)->toBeInstanceOf(Collection::class);
|
||||
expect($outputOld)->toBeInstanceOf(Collection::class);
|
||||
|
||||
ray(Yaml::dump($output->toArray(), 10, 2));
|
||||
// ray(Yaml::dump($output->toArray(), 10, 2));
|
||||
ray(Yaml::dump($outputOld->toArray(), 10, 2));
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user