Skip to content

feat: allow overriding docker compose published port#146

Open
f440 wants to merge 1 commit intomatt1398:mainfrom
f440:portless-compose-host-port
Open

feat: allow overriding docker compose published port#146
f440 wants to merge 1 commit intomatt1398:mainfrom
f440:portless-compose-host-port

Conversation

@f440
Copy link
Copy Markdown

@f440 f440 commented Mar 27, 2026

Allow the Docker Compose host-side published port to be overridden via PORT while keeping the container-side app port fixed at 3456.

This helps tools such as Portless, which launch a process with a dynamically assigned host port and then proxy to that
port. With this change, a command like portless run docker compose up can work without changing the app's internal listen port.

Summary by CodeRabbit

  • Chores
    • Made the claude-devtools service port configurable via environment variable, defaulting to port 3456 when not specified.

@coderabbitai coderabbitai bot added the feature request New feature or request label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the docker-compose.yml file to allow the host port for the claude-devtools service to be configured via the PORT environment variable, defaulting to 3456. The reviewer suggests documenting this new configuration option in the README.md to ensure it is discoverable for users.

build: .
ports:
- "3456:3456"
- "${PORT:-3456}:3456"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change correctly allows overriding the host port, it introduces a new way to configure the service that isn't documented. To make this feature discoverable for users, please consider updating the README.md file.

A good place would be in the Docker / Standalone Deployment section, adding a note and an example of how to use the PORT environment variable to change the published port, like so:

# Run on a different port
PORT=4000 docker compose up

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

The docker-compose.yml file was updated to make the claude-devtools service port binding configurable. The host-to-container port mapping changed from a fixed "3456:3456" to "${PORT:-3456}:3456", allowing the host port to be overridden via the PORT environment variable while defaulting to 3456.

Changes

Cohort / File(s) Summary
Docker Compose Configuration
docker-compose.yml
Updated claude-devtools service port mapping from fixed "3456:3456" to configurable "${PORT:-3456}:3456" via environment variable with fallback default.

Suggested labels

feature request


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docker-compose.yml (1)

4-8: Quick-start comment is now misleading for non-default PORT.

Line 7 always points to http://localhost:3456, but that’s only true when PORT is not overridden. Consider documenting default + override behavior here (and mirror it in README.md Line 82).

✏️ Suggested doc tweak
 # Quick start:
 #   docker compose up
 #
-# Then open http://localhost:3456 in your browser.
+# Then open http://localhost:${PORT:-3456} in your browser.
+# (Default is 3456; override with `PORT=<host_port>`.)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker-compose.yml` around lines 4 - 8, Update the quick-start comment in
docker-compose.yml to avoid hard-coding "http://localhost:3456": state the
default is 3456 (via PORT) and show how to override it (e.g., export PORT=xxxx
or use environment in docker compose) and provide a generic URL example like
"http://localhost:<PORT>". Also update the corresponding note in README.md (the
paragraph referenced around line 82) to mirror this default + override behavior
so both places stay consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docker-compose.yml`:
- Around line 4-8: Update the quick-start comment in docker-compose.yml to avoid
hard-coding "http://localhost:3456": state the default is 3456 (via PORT) and
show how to override it (e.g., export PORT=xxxx or use environment in docker
compose) and provide a generic URL example like "http://localhost:<PORT>". Also
update the corresponding note in README.md (the paragraph referenced around line
82) to mirror this default + override behavior so both places stay consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6816e9e4-7fed-42ae-aa63-52350b0b570e

📥 Commits

Reviewing files that changed from the base of the PR and between f23e881 and f966188.

📒 Files selected for processing (1)
  • docker-compose.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant