Skip to content

feat(deploy): INDEXERUI_BASE_PATH build-arg + bump indexer-ui submodule#310

Merged
Ahmath-Gadji merged 2 commits intodevfrom
feat/indexerui-base-path
Apr 20, 2026
Merged

feat(deploy): INDEXERUI_BASE_PATH build-arg + bump indexer-ui submodule#310
Ahmath-Gadji merged 2 commits intodevfrom
feat/indexerui-base-path

Conversation

@guimard
Copy link
Copy Markdown
Member

@guimard guimard commented Apr 17, 2026

Summary

Enables deploying indexer-ui under a subpath (e.g. /indexerui/) on the same vhost as the OpenRag backend. Needed by environments behind a single TLS-terminating reverse proxy where we want a single origin to avoid cross-origin cookie handling (and the SameSite pain that goes with it).

Changes

  • docker-compose.yaml (service indexer-ui): forward INDEXERUI_BASE_PATH env to the container build as the BASE_PATH Docker build-arg.
  • .env.example: document INDEXERUI_BASE_PATH (commented out, empty = root-level as today, rebuild required after change).
  • extern/indexer-ui: bump submodule pointer to c967017 (the merged OIDC support on openrag-admin-ui@main).

Dependency

Pairs with linagora/openrag-admin-ui#19 (feat(base-path): subpath mounting via BASE_PATH env). Without that PR merged, setting INDEXERUI_BASE_PATH in .env has no effect — the build-arg is passed through compose but the Dockerfile it reaches doesn't read it yet. Merge #19, then bump the submodule pointer again in a follow-up to actually enable the feature.

Usage once both PRs land

# .env
INDEXERUI_BASE_PATH=/indexerui

# then:
docker compose build indexer-ui
docker compose up -d

Reverse proxy (nginx):

location /indexerui/ {
    proxy_pass http://indexer-ui:3000;   # NO trailing slash = path kept intact
}
location / {
    proxy_pass http://openrag-backend:8080;
}

Test plan

  • docker compose config indexer-ui — build.args.BASE_PATH visible
  • Empty INDEXERUI_BASE_PATH (default) → image builds with empty base, app still at root
  • INDEXERUI_BASE_PATH=/indexerui → image builds with base=/indexerui, app reachable at <host>/indexerui/ through the proxy rule above

Summary by CodeRabbit

  • New Features

    • Added support for serving indexer-ui under a custom subpath configuration.
  • Documentation

    • Updated configuration examples and guidance for subpath setup; clarified that Docker rebuild is required after configuration changes.

Lets operators mount indexer-ui under a subpath (e.g. `/indexerui/`)
on the same vhost as the OpenRag backend, eliminating the cross-origin
cookie problem when front and back were on different hosts.

Changes:
- docker-compose.yaml: forward INDEXERUI_BASE_PATH env as BASE_PATH
  build-arg to the indexer-ui Dockerfile.
- .env.example: document INDEXERUI_BASE_PATH (commented, empty = root,
  rebuild required after change).
- extern/indexer-ui: bump pointer to the merged main of openrag-admin-ui
  (c967017 — OIDC support).

Pairs with linagora/openrag-admin-ui#19 (base-path support in the
SvelteKit app). Merging that PR + a subsequent submodule pointer bump
are required to actually deploy under a subpath. Without the PR merged,
setting INDEXERUI_BASE_PATH has no effect (the build-arg is passed but
the Dockerfile it reaches doesn't honor it yet).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@EnjoyBacon7 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 44 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 24 minutes and 44 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6680516f-1d86-4a10-9cb9-6668ec2908d8

📥 Commits

Reviewing files that changed from the base of the PR and between cac96f0 and c20ade3.

📒 Files selected for processing (1)
  • docs/content/docs/documentation/setup_indexerui.md
📝 Walkthrough

Walkthrough

These changes enable serving indexer-ui under an optional subpath by updating environment variable documentation with new INDEXERUI_BASE_PATH guidance, adding a Docker build argument to pass this configuration, and updating the indexer-ui submodule to support this feature.

Changes

Cohort / File(s) Summary
Configuration Documentation
.env.example
Added commented guidance for INDEXERUI_BASE_PATH configuration variable, noting it is consumed as a Docker build ARG, requires image rebuild after changes, and is not read at runtime. Adjusted URL placeholder formatting and removed trailing whitespace.
Docker Infrastructure
docker-compose.yaml
Added BASE_PATH build argument to indexer-ui service image build, reading from ${INDEXERUI_BASE_PATH:-} environment variable (defaults to empty string).
Dependencies
extern/indexer-ui
Updated submodule pointer to a new commit (7616604a38dcdb0b254c5be3dd116e5982bcc278), presumably containing support for subpath-based serving via the new BASE_PATH argument.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With whiskers twitching, I celebrate today,
A subpath option comes to play!
Configuration blooms, the compose files align,
Our indexer-ui shall shine, oh so fine! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: adding INDEXERUI_BASE_PATH build-arg support and updating the indexer-ui submodule pointer, which aligns with the changeset across .env.example, docker-compose.yaml, and extern/indexer-ui.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/indexerui-base-path

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.

Add a §3 "Mount the Indexer UI under a Subpath" section to
setup_indexerui.md covering the single-vhost use case
(same-origin cookie for AUTH_MODE=oidc), the build-arg
semantics and rebuild requirement, and an example nginx
config for the /indexerui/ subpath.
@Ahmath-Gadji Ahmath-Gadji added the feat Add a new feature label Apr 20, 2026
@Ahmath-Gadji Ahmath-Gadji merged commit 5ac78aa into dev Apr 20, 2026
4 checks passed
@Ahmath-Gadji Ahmath-Gadji deleted the feat/indexerui-base-path branch April 20, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat Add a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants