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

How to replace PUBLIC_URL or __PUBLIC_URL_PLACEHOLDER__ in web html? #136

Closed
youamanb opened this issue Mar 8, 2024 · 6 comments
Closed

Comments

@youamanb
Copy link

youamanb commented Mar 8, 2024

how to generate web path in index.html? like <script src="/mypath/babel-polyfill.min.js"></script> , mypath is self defined

@nate-wandb
Copy link
Contributor

Hi @youamanb, I'm not sure I fully understand the question. Could you let me know what your goal is by doing this?

@youamanb
Copy link
Author

youamanb commented Mar 12, 2024

Hi @nate-wandb ,
I run the wandb-local docker image with version wandb/local:0.50.2, and in the docker container,I found the index.html file under the folder /var/app/frontend, the "/var/app/frontend/index.html" is generated from "/var/app/orig_frontend/index.html",and PUBLIC_URL_PLACEHOLDER is in /var/app/orig_frontend/index.html.So I want to replace PUBLIC_URL_PLACEHOLDER with my own defined URL prefix such as “wandb-api”,so I hope the generated file "/var/app/frontend/index.html" has content src path like this " <script src="/wandb-api/raven.min.js" crossorigin="anonymous"></script>",can we do this?

@wandb wandb deleted a comment from sydholl Apr 26, 2024
@anmolmann
Copy link
Contributor

anmolmann commented Apr 26, 2024

Hi @youamanb , you shouldn't need to manually edit these files on your end. Passing the host variable, the FQD of your instance, i.e. https://my.domain.net/ should work. Please set the host and then launch your docker container, you'll see we'll populate the placeholder automatically after parsing it from the host var value. If this doesn't happen in your case, please let us know and we'll investigate this further.
Example cmd:

\docker run --rm -d \
   -e HOST=https://YOUR_DNS_NAME \
   -e LICENSE=XXXXX \

@youamanb
Copy link
Author

youamanb commented Apr 26, 2024 via email

@anmolmann
Copy link
Contributor

Hi @youamanb , I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

@anmolmann
Copy link
Contributor

Hi @youamanb , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

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

No branches or pull requests

3 participants