Setting VERDACCIO_PUBLIC_URL value #3055
-
Hi! We are upgrading from v 4.x to 5.x. Below is our config.yml:
do we add VERDACCIO_PUBLIC_URL to this file? @juanpicado |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 12 replies
-
Same here. I was setting this up locally and trying to test out the VERDACCIO_PUBLIC_URL configuration option and nothing I've tried seems to have worked. I set VERDACCIO_PUBLIC_URL as a temporary env variable on macos, that didn't work. Thank you for any help @juanpicado!! |
Beta Was this translation helpful? Give feedback.
-
Alright after reading a little in the node docs figured out a way to get this running and testing that environment variable locally that I know could help out others.
|
Beta Was this translation helpful? Give feedback.
-
Running on the terminal the node js cli You can review which url the UI using checking the chrome dev tool panel or typing The |
Beta Was this translation helpful? Give feedback.
-
@jaysonpotter and @juanpicado , Thank you both for your help. Have a great weekend! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
how do I set a verdaccio nodejs env while running it as a linux service (systemd)? |
Beta Was this translation helpful? Give feedback.
-
How do I make my verdaccio server start on a ip address that can be publicly accessible? I am using verdaccio v4 |
Beta Was this translation helpful? Give feedback.
-
Hi! Just coming back here with a general feedback - I hope someone can hear it. Using VERDACCIO_PUBLIC_URL is extremely not convenient because the server always returns absolute links with a hostname. It makes it very difficult to use in compose for example. So i have two services, devcontainer and verdaccio. It's up and running - I can access it from devcontainer, but when I access from the browser via localhost ( because I proxy the port ) - ui doesn't even load because in the html page I have static absolute path like http://verdaccio:4873/some/file.js while I expect to have indeed just localhost ( basically it should be relative path, not absolute ). Another problem appears when I use VERDACCIO_PUBLIC_URL=http://localhost:4873 as envrionemnt variable for the container. Now UI starts working, but.. I cannot use it as a registry for npm install in my devcontainer. Because I can access it via --registry http://verdaccio:4873 - but its api still responds with localhost URLs for downloading packages and my devcontainer doesn't understand this. So again - it would be great if middleware could just send relative links, not absolute - then it would just worked. The only way I managed to use verdaccio in the compose - is to use a host network for a devcontainer.
What do you think of this? Thanks! |
Beta Was this translation helpful? Give feedback.
Alright after reading a little in the node docs figured out a way to get this running and testing that environment variable locally that I know could help out others.
VERDACCIO_PUBLIC_URL=https://somedomain.org verdaccio