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_URL issue #550

Closed
sebastianvoss opened this issue Jan 26, 2023 · 12 comments · Fixed by #714
Closed

BASE_URL issue #550

sebastianvoss opened this issue Jan 26, 2023 · 12 comments · Fixed by #714
Labels
bug Something isn't working released

Comments

@sebastianvoss
Copy link
Contributor

When using the docker image with parameter BASE_URL it seem to not work as expected. Accessing the path it results in an 404 error.

docker run -it -p 8000:80 -e BASE_URL=/test asyncapi/studio:0.16.0
# open http://localhost:8000/test will result in 404
@sebastianvoss sebastianvoss added the bug Something isn't working label Jan 26, 2023
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label May 27, 2023
@sebastianvoss
Copy link
Contributor Author

I checked with version 0.18.1 and it has the same issue.

@github-actions github-actions bot removed the stale label May 28, 2023
@dlouzan
Copy link

dlouzan commented Jul 3, 2023

Interestingly, on a k8s cluster, this was working for us properly until 0.18.1 with no issues, but the latest 1.0.0 version broke it, none of the images, js, nor css can be loaded on a subpath. Reverting to 0.18.1 fixed it for the time being.

Using docker with BASE_URL setting. I can see in the code that the build target was modified in 1.0.0 to use turbo vs craco earlier: v0.18.1...ui-v1.0.0

@fgreinacher

@fgreinacher
Copy link
Contributor

fgreinacher commented Jul 4, 2023

Seems that https://github.com/asyncapi/studio/pull/688/files broke this.

Will provide a fix.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version @asyncapi/studio-v1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sebastianvoss
Copy link
Contributor Author

I think it is still an issue. I just tested it with:

docker run -it -p 8000:80 -e BASE_URL=/test asyncapi/studio:1.0.0

@KhudaDad414 KhudaDad414 reopened this Sep 4, 2023
@KhudaDad414
Copy link
Member

KhudaDad414 commented Sep 4, 2023

@fgreinacher I tried to find the issue but I can't find it. the BASE_URL_PLACEHOLDER is being set up correctly and the echo "find /usr/share/nginx/html/ -type f -print0 | xargs -0 sed -i \"s|${BASE_URL_PLACEHOLDER}|\${BASE_URL}|g\"" > $ENTRYPOINT_SCRIPT && chmod +x $ENTRYPOINT_SCRIPT also works fine. can you see what is wrong here? 🤔

@sebastianvoss
Copy link
Contributor Author

Hi @fgreinacher and @KhudaDad414 Thanks for all your effort and the great project. Did you already had the chance to look into this further?

@KhudaDad414
Copy link
Member

@sebastianvoss I will look into this.

@KhudaDad414
Copy link
Member

@sebastianvoss I have tested it and it seems to be working fine.
when I run:
docker run -it -p 8000:80 asyncapi/studio
it works fine without any errors.

docker run -it -p 8000:80 -e BASE_URL=/a/custom/path asyncapi/studio
will give these errors for me which is expected since I am not hosting the static files there:
Screenshot 2023-12-18 at 16 49 04

@sebastianvoss
Copy link
Contributor Author

@KhudaDad414 Thanks for your feedback. You are right, I had a wrong understanding of the BASE_URL parameter. I thought it is something like a context path which results the artefacts are hosted on that path. I changed my setup to rewrite the URL from /a/custom/path asyncapi/studio to / before passing the traffic to studio and everything works now.

Thanks again for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants