Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(parsers): replace hyphens with underscores in service names for consistency. this allows to properly parse custom domains in docker compose based applications

Andras Bacsai4a1eb064a46e
diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.php
index f35e73390a..5737488c0c 100644
--- a/bootstrap/helpers/parsers.php
+++ b/bootstrap/helpers/parsers.php
@@ -640,6 +640,7 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int
if ($resource->build_pack !== 'dockercompose') {
$domains = collect([]);
}
+ $serviceName = str($serviceName)->replace('-', '_')->value();
$fqdns = data_get($domains, "$serviceName.domain");
// Generate SERVICE_FQDN & SERVICE_URL for dockercompose
if ($resource->build_pack === 'dockercompose') {
@@ -1655,6 +1656,7 @@ function serviceParser(Service $resource): Collection
});
}
}
+ $serviceName = str($serviceName)->replace('-', '_')->value();
if (! $isDatabase && $fqdns instanceof Collection && $fqdns->count() > 0) {
$shouldGenerateLabelsExactly = $resource->server->settings->generate_exact_labels;
$uuid = $resource->uuid;