feat: services

This commit is contained in:
Andras Bacsai
2023-09-25 15:48:43 +02:00
parent 58522b59b7
commit 0b11093d18
27 changed files with 314 additions and 87 deletions

View File

@@ -130,7 +130,7 @@ function get_port_from_dockerfile($dockerfile): int
return 80;
}
function defaultLabels($id, $name, $pull_request_id = 0, string $type = 'application')
function defaultLabels($id, $name, $pull_request_id = 0, string $type = 'application', $subType = null, $subId = null)
{
$labels = collect([]);
$labels->push('coolify.managed=true');
@@ -141,6 +141,10 @@ function defaultLabels($id, $name, $pull_request_id = 0, string $type = 'applica
if ($pull_request_id !== 0) {
$labels->push('coolify.pullRequestId=' . $pull_request_id);
}
if ($type === 'service') {
$labels->push('coolify.service.subId=' . $subId);
$labels->push('coolify.service.subType=' . $subType);
}
return $labels;
}
function fqdnLabelsForTraefik(Collection $domains, $container_name, $is_force_https_enabled)