Skip to content

[Bug]: Preview deployment links in GitHub PR comments include internal container portsΒ #11065

Description

@cbardasano

Description and Error Message

When using Docker Compose applications with services that listen on non-standard ports (e.g. 3000, 3001), the domain configuration correctly requires the port so the proxy knows where to route traffic:

https://example.com:3000
https://example.com:3001/backend

According to the official documentation :

The port here only tells Coolify where to send traffic within the container; the proxy will make this service available on the normal port (http://example.com port 80/443).

However, the automatic comment that Coolify posts on GitHub Pull Requests includes the internal port in the links:

https://136.example.com:3000
https://136.example.com:3001/backend

Expected Behavior

The links in the PR comment should be cleaned of the internal port, e.g.:

https://136.example.com
https://136.example.com/backend

Steps to Reproduce

  1. Create a Docker Compose application in Coolify with at least one service that listens on a non-standard port (e.g. 3000 or 3001).
  2. In the domain configuration for that service, include the port (as required by the documentation), for example:
    • https://myapp.example.com:3000
    • https://myapp.example.com:3001/backend
  3. Enable Preview Deployments and set a URL template (e.g. {{pr_id}}.{{domain}}).
  4. Open a Pull Request against the configured branch.
  5. Wait for the preview deployment to finish.
  6. Check the automatic comment that Coolify posts on the PR.

Example Repository URL

No response

Coolify Version

v4.1.2

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Screenshots / Visuals

No response

Additional Information

Suggested fix

Update getPreviewLinks() in ApplicationPullRequestUpdateJob.php to clean the domains before generating the Markdown links using getFqdnWithoutPort() defined in shared.php

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions