Skip to content

fix(docker-compose): make web host port overridable for macOS (#37)#44

Open
ChrisJr404 wants to merge 1 commit into
Commando-X:mainfrom
ChrisJr404:fix/macos-port-5000-conflict-37
Open

fix(docker-compose): make web host port overridable for macOS (#37)#44
ChrisJr404 wants to merge 1 commit into
Commando-X:mainfrom
ChrisJr404:fix/macos-port-5000-conflict-37

Conversation

@ChrisJr404

Copy link
Copy Markdown

Closes #37.

macOS Monterey+ reserves port 5000 for Control Center (AirPlay Receiver / Handoff), so `docker-compose up` fails out-of-the-box on Mac with `Ports are not available: ... bind: address already in use`. Mac users either had to disable AirPlay system-wide or hand-edit the compose file.

Replaces the hard-coded `5000:5000` mapping with `${WEB_PORT:-5000}:5000`. Default stays `5000` so existing Linux setups are completely unchanged; Mac users sidestep the conflict with one env var:

```bash
WEB_PORT=8085 docker-compose up -d --build
```

The README's run section now has a callout explaining the AirPlay conflict + the override, so Mac users don't have to dig through issue history.

I went with the env-var approach instead of the issue's suggested "just change the default to 8085" because:

  • Linux + WSL users keep the same port they've always used. Zero docs/curl/walkthrough breakage.
  • All existing references in README to `http://localhost:5000\` (API docs, GraphQL endpoint, merchant integration examples, the upload PoC commands) stay correct.
  • One env var works for any other macOS host that happens to have something else on 5000 too — not just Control Center.

`docker compose config` round-trips correctly with the override:

```
$ WEB_PORT=8085 docker compose config | grep -A 1 published
published: "5432" # postgres, unchanged
published: "8085" # web — picked up the env var
published: "80" # alternate web mapping, unchanged
```

Test plan:

  • `docker compose config` syntactically clean
  • Env var override resolves to the supplied port
  • Default (no env var) still resolves to 5000
  • README callout clearly distinguishes the macOS path from the Linux/WSL path

…do-X#37)

macOS Monterey+ reserves port 5000 for Control Center (AirPlay
Receiver / Handoff), so `docker-compose up` fails out-of-the-box on
Mac with `bind: address already in use`. The reporter shouldn't have
to disable AirPlay just to run the lab.

Replaces the hard-coded `5000:5000` mapping with `${WEB_PORT:-5000}:5000`.
Default stays 5000 so existing Linux setups are unchanged; Mac users
can sidestep the conflict with one env var:

    WEB_PORT=8085 docker-compose up -d --build

The README documents the gotcha as a callout under the run instructions
so Mac users don't have to dig through issue history to find the fix.

Verified `docker compose config` resolves the override correctly:
WEB_PORT=8085 yields `published: "8085"` on the web service.
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.

MacOS Installation Issue: Port 5000 Conflict with Control Center (AirPlay Receiver/Handoff)

1 participant