fix(coolify): suppress host port binding with empty ports_mappings#118
Open
rdemeritt wants to merge 10 commits into
Open
fix(coolify): suppress host port binding with empty ports_mappings#118rdemeritt wants to merge 10 commits into
rdemeritt wants to merge 10 commits into
Conversation
127.0.0.1:9080:9080 causes ERR_EMPTY_RESPONSE on macOS Docker Desktop — TCP handshake completes but data transfer silently drops. Binding to all interfaces (9080:9080) resolves host-level access to the HermitHost UI.
…ected Docker Desktop returns 403 with 'already exists in network' when a container is already a member of the target network. Previously this was treated as a proxy denial and the whole route provision aborted. Detect this specific message and treat it as the existing 409 no-op path.
PAT set as URL username (https://PAT@github.com) caused git to prompt for a password — no TTY in Coolify helper container → deploy failure. GitHub requires the PAT as the password: https://x-access-token:PAT@github.com.
GET /api/sites was firing listDeployments() for every app (N extra calls per request). Startup sync was calling getApplication() per dockercompose app redundantly — listApplications() already returns the same data. Combined these hit Coolify's 200 req/min rate limit during development restarts, causing 429 → 500 on the sites page. Fix: pass [] for deployments on list view (detail endpoint unchanged); remove redundant getApplication() from startup sync.
… to prevent rate limit
…pp.build_pack not body.build_pack
…compose app creation
With proxy_type=none, Coolify binds ports_exposes directly to the host. All sites default to port 3000, so the second deploy always conflicts. Empty ports_mappings suppresses host binding; ports_exposes stays for internal Traefik routing.
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.
Summary
proxy_type=none, Coolify bindsports_exposesdirectly to the host machine as a-p PORT:PORTDocker mappingports_exposes: '3000'→ second deploy always fails with port already allocatedports_mappings: ''on app creation to suppress host binding;ports_exposesstays so hermithost's Traefik still knows the internal container portChanges
api/src/services/coolify.ts— addedports_mappings?: stringtoCoolifyCreateApplicationPayloadapi/src/routes/sites.ts— passports_mappings: ''on site createapi/src/services/backup.ts— passports_mappings: ''on restore/importTest plan
docker psshows no0.0.0.0:3000->3000mapping)Note
Existing deployed sites retain their current host-port bindings (port mappings are immutable post-creation in Coolify). Conflicting old sites must be deleted and redeployed.