Self-host fix: pass NEXT_PUBLIC_API_URL to dashboard (compose) + docs troubleshooting
📥 Pull Request
📘 Description
Fixes self-hosted AgentOps setup where the dashboard incorrectly posts to http://localhost:3000/auth/login (returning 404) instead of the API service on port 8000.
Root Cause: The dashboard's API client reads NEXT_PUBLIC_API_URL to determine the backend URL, but this environment variable wasn't being passed to the dashboard container in Docker Compose, causing requests to default to the dashboard's own host.
Changes:
- Added
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}to dashboard service environment incompose.yaml - Added troubleshooting note in README.md to help users identify this issue
🧪 Testing ⚠️ Manual testing required - This fix was developed based on HAR file analysis and code inspection but hasn't been tested end-to-end with a running compose stack.
Recommended verification:
- Ensure
app/.envincludesNEXT_PUBLIC_API_URL=http://localhost:8000 - Run
docker compose up -dfromapp/directory - Verify dashboard at
http://localhost:3000makes requests tohttp://localhost:8000(not:3000) - Check browser network tab for successful API calls with proper CORS headers
⚠️ Review Checklist:
- [ ] Verify that
.env.exampleincludesNEXT_PUBLIC_API_URL(should be present) - [ ] Consider backwards compatibility: should we provide a default value for missing env var?
- [ ] Validate that the troubleshooting note accurately describes the symptom
- [ ] Test with actual Docker Compose setup if possible
Link to Devin run: https://app.devin.ai/sessions/bb2e39c488334c21854b3aa218db0579
Requested by: @areibman
🤖 Devin AI Engineer
I'll be helping with this pull request! Here's what you should know:
✅ I will automatically:
- Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
- Look at CI failures and help fix them
Note: I can only respond to comments from users who have write access to this repository.
⚙️ Control Options:
- [ ] Disable automatic comment and CI monitoring