-
-
Notifications
You must be signed in to change notification settings - Fork 10
chore: Fix prisma studio localhost refused (#2981) #2982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request fixes Prisma Studio connectivity in Docker environments by addressing port exposure issues. The changes include: modifying the development script to kill existing Studio processes and bind to port 5555, exposing port 5555 in the compose configuration, and documenting the root cause and solution. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CONTRIBUTING.md (1)
179-181: Good defensive approach to ensure consistent port usage.The two-step process (kill existing processes + start on fixed port) prevents the port increment issue documented in plan.md. The
|| trueensures robustness when no Studio process exists.Minor consideration: The
sh -lcwrapper invokes a login shell. If environment setup is not required here, you could simplify to a directpkillcall. However, the current approach is safe and functional.💡 Optional simplification if login shell is not required
- `sh -lc "pkill -f 'prisma.*studio' || true"` + `pkill -f 'prisma.*studio' || true`Only apply this if you've confirmed that the login shell (
-l) is not needed for your environment setup.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (3)
CONTRIBUTING.md(1 hunks)compose.yaml(1 hunks)docs/dev-notes/2025-12-20/fix-prisma-studio-localhost-refused/plan.md(1 hunks)
🔇 Additional comments (2)
compose.yaml (1)
6-6: LGTM! Port exposure for Prisma Studio.This change correctly exposes port 5555 to allow host browser access to Prisma Studio, resolving the "localhost refused" issue when running in Docker-only environments.
docs/dev-notes/2025-12-20/fix-prisma-studio-localhost-refused/plan.md (1)
1-119: Excellent comprehensive documentation of the issue and solution.This documentation thoroughly explains:
- Root cause (port publishing vs. port forwarding)
- Troubleshooting steps with verification commands
- The port increment issue and persistent workaround
- Operational considerations for different environments
The distinction between Docker-only usage (requiring
docker compose execprefix and-Tflag) and Dev Container usage (commands run inside container) is correctly maintained. The use of-Tflag on line 76 for the kill command is appropriate for non-interactive script execution, while its absence on line 82 for Studio startup is correct for keeping the interactive process running.
KATO-Hiro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
close #2981
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.