You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
Go to that path localhost:7701/meilisearch-ui
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
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?
The text was updated successfully, but these errors were encountered:
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:
docker run -d --restart=always --name="meilisearch-ui" -p 7701:24900 -e BASE_PATH="/meilisearch-ui" riccoxie/meilisearch-ui:latest
localhost:7701/meilisearch-ui
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
Environments (please complete the following information):
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 testedv0.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?
The text was updated successfully, but these errors were encountered: