fix(deploy): no host ports; route via dokploy-network (Traefik)#99
Merged
Conversation
Publishing 3000/3001/3002 to the host collides with other apps sharing
the VPS ("Bind for 0.0.0.0:3000 failed: port is already allocated").
Dokploy's Traefik routes by domain over its shared network, so host
ports are unnecessary and harmful here.
- drop `ports:` from web/marketing/admin; add `expose:` instead
- web/marketing/admin join external `dokploy-network` (Traefik) + a
private `internal` network for db/redis access
- postgres/redis/migrate/backup stay on `internal` only
- doc note on the networking model + how to rename the proxy network
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
Deploy failed:
Bind for 0.0.0.0:3000 failed: port is already allocated. The VPS runs 2 other platforms already holding 3000/3001/3002. The compose published those host ports, which is both unnecessary and collision-prone under Dokploy.Fix
Dokploy's Traefik routes each domain to the container over its shared
dokploy-network, using the container port from the Domain config — no host port binding needed.ports:from web/marketing/admin; addedexpose:(documentation only).dokploy-network(Traefik) + a privateinternalnetwork (so they reach postgres/redis).internalonly — never exposed.Validated
docker compose configresolves; output has zero published host ports; web/marketing/admin on both networks, data services oninternal.Deploy note
Each service still needs its Domain configured in Dokploy (host → service, container port 3000/3001/3002) so Traefik knows where to route. The
dokploy-networkmust exist (default on Dokploy installs).🤖 Generated with Claude Code