Skip to content

Commit

Permalink
Merge branch 'next' of github.com:coollabsio/coolify into next
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed May 14, 2024
2 parents e95e2cf + 80f5506 commit 576cbc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bootstrap/helpers/shared.php
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
$servicePorts = collect(data_get($service, 'ports', []));
$serviceNetworks = collect(data_get($service, 'networks', []));
$serviceVariables = collect(data_get($service, 'environment', []));
$serviceDependencies = collect(data_get($service, 'depends_on', []));
$serviceLabels = collect(data_get($service, 'labels', []));
$serviceBuildVariables = collect(data_get($service, 'build.args', []));
$serviceVariables = $serviceVariables->merge($serviceBuildVariables);
Expand Down Expand Up @@ -1370,6 +1371,13 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
data_set($service, 'volumes', $serviceVolumes->toArray());
}

if ($pull_request_id !== 0 && count($serviceDependencies) > 0) {
$serviceDependencies = $serviceDependencies->map(function ($dependency) use ($pull_request_id) {
return $dependency . "-pr-$pull_request_id";
});
data_set($service, 'depends_on', $serviceDependencies->toArray());
}

// Decide if the service is a database
$isDatabase = isDatabaseImage(data_get_str($service, 'image'));
data_set($service, 'is_database', $isDatabase);
Expand Down

0 comments on commit 576cbc0

Please sign in to comment.