Skip to content

[Bug]: Trigger.dev deployment exposes internal container port in generated origin URLs #10

Description

@Stacylia

Error Message and Logs

The default Trigger.dev service configuration populates the origin-related environment variables with a URL that includes the container's internal port (3000). As a result, the application advertises endpoints such as https://trigger.example.com:3000, even though that port is only available inside the Docker network.

This leads to several issues:

  • Authentication redirects point to an inaccessible address (https://trigger.example.com:3000/...).
  • The Trigger.dev CLI cannot communicate with the instance and reports a connection failure when attempting to retrieve project settings.

Steps to Reproduce

  1. Deploy the Trigger.dev service through Coolify using a public domain (for example, trigger.example.com).

  2. Install the CLI and run:

    npx trigger.dev@latest login --api-url https://trigger.example.com
    
  3. Observe that the generated authentication URL contains :3000.

  4. If the port is manually removed to complete authentication, running:

    npx trigger.dev@latest dev
    

    still fails because the backend continues returning URLs containing the internal port.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.452

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.04

Additional Information

The Compose template currently assigns the origin variables using the value intended for the container's internal endpoint:

  • APP_ORIGIN=${SERVICE_URL_TRIGGER_3000}
  • LOGIN_ORIGIN=${SERVICE_URL_TRIGGER_3000}
  • API_ORIGIN=${SERVICE_URL_TRIGGER_3000}

Those variables should instead reference the externally accessible service URL:

  • APP_ORIGIN=${SERVICE_URL_TRIGGER}
  • LOGIN_ORIGIN=${SERVICE_URL_TRIGGER}
  • API_ORIGIN=${SERVICE_URL_TRIGGER}

It's also worth noting that modifying these variables from the Coolify Environment Variables interface does not resolve the issue. The values declared directly in the Docker Compose environment: section override the UI-managed variables, so the only effective workaround is to edit the Compose template itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions