feat: allow configuring internal port via CONVERTX_PORT#564
Closed
upmcplanetracker wants to merge 1 commit into
Closed
feat: allow configuring internal port via CONVERTX_PORT#564upmcplanetracker wants to merge 1 commit into
upmcplanetracker wants to merge 1 commit into
Conversation
…TX_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_PORTenvironment variable before falling back toPORTor the default3000.Motivation
While ConvertX already supports the generic
PORTenvironment variable, adding a container-specific variable (CONVERTX_PORT) provides distinct advantages for advanced homelab deployments:network_mode: host): Essential for deployments where using a genericPORTvariable can cause unintended environment leakage or conflicts across multiple containers sharing the host network namespace.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 to3000. Existing installations and deployments relying on the genericPORTvariable will experience zero breaking changes.Summary by cubic
Allow configuring the server’s internal port via
CONVERTX_PORT, falling back toPORTand then3000. This improves container deployments with explicit app ports while keeping full backward compatibility (CONVERTX_PORT -> PORT -> 3000).Written for commit c18c800. Summary will update on new commits.