ConvertX icon indicating copy to clipboard operation
ConvertX copied to clipboard

feat: allow configuring internal port via CONVERTX_PORT

Open upmcplanetracker opened this issue 5 months ago • 0 comments

Update index.tsx for feat: allow configuring internal port via CONVERTX_PORT

Description

This PR updates the server initialization line to check for a dedicated CONVERTX_PORT environment variable before falling back to PORT or the default 3000.

Motivation

While ConvertX already supports the generic PORT environment variable, adding a container-specific variable (CONVERTX_PORT) provides distinct advantages for advanced homelab deployments:

  1. Host Networking Layering (network_mode: host): Essential for deployments where using a generic PORT variable can cause unintended environment leakage or conflicts across multiple containers sharing the host network namespace.
  2. Explicit Configuration: Makes docker-compose files and Podman Quadlets much easier to read and maintain by keeping environment variables distinct to their specific applications.

Backward Compatibility

This change utilizes a standard fallback chain (process.env.CONVERTX_PORT || process.env.PORT || 3000). If neither variable is set, the application continues to default to 3000. Existing installations and deployments relying on the generic PORT variable will experience zero breaking changes.


Summary by cubic

Allow configuring the server’s internal port via CONVERTX_PORT, falling back to PORT and then 3000. This improves container deployments with explicit app ports while keeping full backward compatibility (CONVERTX_PORT -> PORT -> 3000).

Written for commit c18c8000babe44a574f1cd5d1466a3bec7df69e2. Summary will update on new commits.

Review in cubic

upmcplanetracker avatar Jun 09 '26 13:06 upmcplanetracker