Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 23, 2025

Document self-hosted base path configuration

Summary

Adds documentation for the NEXT_PUBLIC_BASE_PATH environment variable that allows self-hosted deployments to serve documentation from a subpath (e.g., https://example.com/docs instead of https://example.com).

This feature was added in fern-platform PR #5393 but was not documented in the user-facing setup guide. The documentation includes:

  • Runtime configuration using the environment variable
  • Example Docker run command
  • Warning about proper slash formatting

Review & Testing Checklist for Human

  • Verify environment variable name: Confirm NEXT_PUBLIC_BASE_PATH is the correct variable name for runtime configuration (I based this on code review of fern-platform PR #5393)
  • Test with actual deployment: Run a self-hosted Docker container with this configuration to verify the example command works and docs are accessible at the subpath
  • Validate slash formatting rules: Confirm the warning about leading/trailing slashes matches Next.js basePath behavior
  • Check placement: Verify this optional step makes sense at the end of the setup flow vs. earlier in the process

Test Plan

  1. Pull a self-hosted Docker image
  2. Run with base path: docker run -p 3000:3000 -e NEXT_PUBLIC_BASE_PATH=/docs <image>
  3. Verify docs are accessible at http://localhost:3000/docs
  4. Verify docs are NOT accessible at http://localhost:3000/
  5. Test with invalid formats (no leading slash, trailing slash) to confirm they fail as expected

Notes

@devin-ai-integration
Copy link
Contributor Author

🤖 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

Your documentation will be available at `localhost:<port-number>/docs`.

<Warning>
The base path must start with a forward slash and should not end with one. For example, use `/docs` not `docs` or `/docs/`.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'shouldn't' instead of 'should not'.

@github-actions
Copy link
Contributor

@dannysheridan
Copy link
Member

look at who made the PR to fern-platform which inspired this PR. make that person the assignee for this PR.

@devin-ai-integration
Copy link
Contributor Author

Assigned @coltondotio who created the original fern-platform PR #5393 that added this feature.

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.

3 participants