agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Self-host fix: pass NEXT_PUBLIC_API_URL to dashboard (compose) + docs troubleshooting

Open devin-ai-integration[bot] opened this issue 4 months ago • 1 comments

📥 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 in compose.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:

  1. Ensure app/.env includes NEXT_PUBLIC_API_URL=http://localhost:8000
  2. Run docker compose up -d from app/ directory
  3. Verify dashboard at http://localhost:3000 makes requests to http://localhost:8000 (not :3000)
  4. Check browser network tab for successful API calls with proper CORS headers

⚠️ Review Checklist:

  • [ ] Verify that .env.example includes NEXT_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