47 points · by sheetjs · 8y ago · 14 comments
It was pretty indispensable to be able to try out such automation without spamming real npm with 100s of sometimes broken packages.
https://github.com/steve-taylor/artifact-server-config
It also deploys Artifactory OSS and a Docker registry, but you can quite easily rip all that out.
All you have to do is create a RancherOS instance with the generated cloud-config.yml pasted into the User Data field (and you’ll need to provide an SSH key, of course).
The proxy has also been a handy feature for us to mitigate the risk of broken builds due to now unpublished packages from the official npm (though this shouldn't be a problem anymore). Can really recommend it.
Does anyone know if it's possible to use this as a cache for installing packages from https://registry.npmjs.org/?
I have something exactly like this setup on my laptop to proxy PyPI and allow installing packages from cache when I'm offline or in the rare PyPI outage.
Edit: It has cache, but I mean does it use the cache if NPM is down or I'm offline.