Skip to content

fix(deploy): no host ports; route via dokploy-network (Traefik)#99

Merged
f-amine merged 1 commit into
masterfrom
fix/no-host-ports-traefik
Jun 18, 2026
Merged

fix(deploy): no host ports; route via dokploy-network (Traefik)#99
f-amine merged 1 commit into
masterfrom
fix/no-host-ports-traefik

Conversation

@f-amine

@f-amine f-amine commented Jun 18, 2026

Copy link
Copy Markdown
Owner

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.

  • Removed ports: from web/marketing/admin; added expose: (documentation only).
  • web/marketing/admin join external dokploy-network (Traefik) + a private internal network (so they reach postgres/redis).
  • postgres/redis/migrate/backup stay on internal only — never exposed.
  • Doc note explaining the model + how to rename the proxy network if theirs differs.

Validated

docker compose config resolves; output has zero published host ports; web/marketing/admin on both networks, data services on internal.

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-network must exist (default on Dokploy installs).

🤖 Generated with Claude Code

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>
@f-amine f-amine merged commit 9af658b into master Jun 18, 2026
3 checks passed
@f-amine f-amine deleted the fix/no-host-ports-traefik branch June 18, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant