Skip to content

Fix hardcoded localhost:8080 in startLocalContainers #100

@ewega

Description

@ewega

Problem

startLocalContainers() in deploy_local.go:532 hardcodes:

go backendURL := "http://localhost:8080"

This is used as the health-check target regardless of what ports the docker-compose file actually maps. If a user runs deploy local --source custom with a compose file mapping DevLake to port 8085 (or any non-8080 port), the health check polls the wrong URL and eventually reports:

DevLake not ready after 6 minutes — check: docker compose logs devlake

...even though the containers are healthy and responding on the correct port.

Fix Options

  1. Parse the compose file for the backend port mapping (most robust)
  2. Accept an optional --backend-port flag (simplest)
  3. Try both well-known ports (8080, 8085) like Discover does (pragmatic)

Option 3 is probably the best balance — it aligns with the existing discovery logic in discovery.go:43-59 which already checks both 8080 and 8085.

Acceptance Criteria

  • deploy local --source custom with a compose mapping port 8085 correctly detects the backend
  • Default port 8080 behavior unchanged for official and fork deploys
  • go build ./... and go test ./... pass

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions