coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
33.98k stars 1.84k forks source link

[Bug]: `generateFqdn` does not match the `Host` Traefik label #3048

Open Telokis opened 2 months ago

Telokis commented 2 months ago

Description

When we create a resource and manually override its FQDN through the interface, the change is properly taken into account in the Traefik labels.
However, this change is not reflected by generateFqdn, which means that our SERVICE_FQDN_ and SERVICE_URL_ special variables do not match the real expected FQDNs.

Minimal Reproduction (if possible, example repository)

Proposed solution

After looking through the code, I've noticed that the generateFqdn function (Here) could maybe be improved using a third parameter set to $resource->fqdn when $resource->getMorphClass() === 'App\Models\Application'. (Here, for example).

Though I'm not sure how that could be fixed for the case where $resource->getMorphClass() === 'App\Models\Service'.

Exception or Error

No response

Version

v4.0.0-beta.319

Cloud?

carlonoelle commented 1 month ago

Having the same issue, still persisting in 4.0.0-beta.334