Skip to content

fix(devcontainer): prevent PORT env from leaking to Next.js#427

Merged
jakehobbs merged 1 commit into
mainfrom
jakehobbs/port-already-in-use-fix
May 30, 2026
Merged

fix(devcontainer): prevent PORT env from leaking to Next.js#427
jakehobbs merged 1 commit into
mainfrom
jakehobbs/port-already-in-use-fix

Conversation

@jakehobbs
Copy link
Copy Markdown
Member

Summary

  • Remove export PORT from the Makefile so Next.js doesn't inherit the Go server's port and attempt to bind it, causing an address already in use crash on startup
  • Use env -u PORT pnpm dev to explicitly strip PORT from the Next.js process (needed because Conductor injects PORT as a shell env var, which persists regardless of the Makefile export)
  • Pass PORT=$(PORT) explicitly only to go run main.go
  • Update conductor.json setup script to seed the dev database (make dev_db) and activist data (adb seed activists) after installing deps

Test plan

  • Run setup in Conductor — devcontainer comes up, deps install, DB is seeded with dev user and activist data
  • Run app in Conductor — Go server binds the workspace port, Next.js starts on 3000, no address already in use error

🤖 Generated with Claude Code

Remove `export PORT` from the Makefile so the Go server's port is not
broadcast to all child processes (Next.js reads PORT and would bind the
same port as the Go server). Pass PORT explicitly only to `go run` and
use `env -u PORT` to strip it from the Next.js dev process. Update the
conductor.json setup script to seed the dev database and activist data
after installing deps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 30, 2026 20:08
@jakehobbs jakehobbs requested a review from alexsapps as a code owner May 30, 2026 20:08
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Warning

Review limit reached

@jakehobbs, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 22 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c83952b-1adb-453c-b0ac-d80d85fbe02c

📥 Commits

Reviewing files that changed from the base of the PR and between a35b299 and 201e163.

📒 Files selected for processing (2)
  • Makefile
  • conductor.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jakehobbs/port-already-in-use-fix

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.

@jakehobbs jakehobbs merged commit b3bc08e into main May 30, 2026
2 of 3 checks passed
@jakehobbs jakehobbs deleted the jakehobbs/port-already-in-use-fix branch May 30, 2026 20:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants