Skip to content
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

BASE_PATH no longer works #178

Open
KasperGam opened this issue Dec 9, 2024 · 0 comments
Open

BASE_PATH no longer works #178

KasperGam opened this issue Dec 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@KasperGam
Copy link

KasperGam commented Dec 9, 2024

Describe the bug
It looks like after the switch to nginx as a server for the docker image, the BASE_PATH environment variable no longer works for running this project under a base path.

To Reproduce
Steps to reproduce the behavior:

  1. Run the docker image with the provided script in the README: docker run -d --restart=always --name="meilisearch-ui" -p 7701:24900 -e BASE_PATH="/meilisearch-ui" riccoxie/meilisearch-ui:latest
  2. Go to that path localhost:7701/meilisearch-ui
  3. See 404 page, and requests are being made to localhost:7701/ for assets, CSS, etc.

Expected behavior
Expect to see the project is hosted correctly at the base path of /meilisearch-ui and that requests are relative to that URL for assets, CSS, and scripts.

Screenshots

393908121-a3b8ac91-cc35-4ac7-bde8-895817c13d72

Environments (please complete the following information):

  • OS: macOS 14.7.1
  • Browser: Firefox
  • Version latest (v0.10.0)

Additional context
I am pretty sure this is because the project switched from vite serving the files, which would have respected the BASE_PATH, to nginx serving them, which would only know about the base path from build time which is just /. You can see that versions before the switch to nginx work fine, e.g. I tested v0.6.12 and it works as expected.

Not sure how to best get around this issue, as serving the static built files is much better for the docker image, but it breaks this feature unfortunately. Maybe there is a way to do this with some nginx template config that gets updated at run time based on the environment variables?

@KasperGam KasperGam added the bug Something isn't working label Dec 9, 2024
@riccox riccox moved this to 💤 TODO in Meilisearch-UI Roadmap Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 💤 TODO
Development

No branches or pull requests

1 participant