fix(docker-compose): make web host port overridable for macOS (#37)#44
Open
ChrisJr404 wants to merge 1 commit into
Open
fix(docker-compose): make web host port overridable for macOS (#37)#44ChrisJr404 wants to merge 1 commit into
ChrisJr404 wants to merge 1 commit into
Conversation
…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.
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.
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:
`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: