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

Self hosting? #98

Closed
loganvolkers opened this issue May 17, 2018 · 16 comments
Closed

Self hosting? #98

loganvolkers opened this issue May 17, 2018 · 16 comments

Comments

@loganvolkers
Copy link

Is there any support or desire for allowing people to self-host their own version of unpkg?

We're big fans of Unpkg but from a security and compliance perspective we'd like to host it ourselves. Seems useful for production applications, and also helps reduce your public CDN bill.

I tried just forking the repo and running it on Heroku, but I get a Error: Cannot find module 'webpack-dev-server' on startup.

@mjackson
Copy link
Owner

Yes, this is in the works. The plan is to build and host a Docker image that people can use to run it on their own infrastructure.

@e-sathya
Copy link

My understanding is that once the Docker image is published , we should be able to run our own unpkg instance that can point to any private npm registry. We also believe there will be guidelines published to do the same. Please clarify.

@styfle
Copy link

styfle commented Jul 3, 2018

Related to #36

@Trakkasure
Copy link

Is there any update to self hosting and pointing to a corporate private repo (such as artifactory)?

@jonaskello
Copy link

I'm also interested in hosting for a private npm registry. I found express-unpkg which seems to do what I want but the code for that package seems gone.

@kentcdodds
Copy link

I don't know if this would be possible, but I'd love it if unpkg could be published as a module on npm that I could install and run similar to https://polyfill.io which publishes http://npm.im/polyfill-service :)

That way I could mount it into an existing express server (my thoughts right now are to have it running alongside my polyfill-service server at the moment).

@thecodejack
Copy link

Are there any steps to atleast set this up locally for a private npm registry? Any idea what happened with express-unpkg?

@timomayer
Copy link

any progress with the self hosted version? we really want to use unpkg, but for now we are not able to use our own instance

@KevinSheedy
Copy link

I've published a Self Hosted version of unpkg to npm as unpkg-server here:
https://www.npmjs.com/package/unpkg-server

I'm using it against a private npm registry (Nexus) in my own organisation.
In summary, you can run:

npm i unpkg-server

node node_modules/unpkg-server/server.js \
  --NPM_REGISTRY_URL=https://private-npm-registry.example.org \
  --PORT=8081

Here's the PR back to the unpkg repo:
#216

@timomayer
Copy link

@KevinSheedy thanks a lot. Do you have any plans to make it a little bit more independent from the infrastructure used by unpkg (google cloud services and cloudflare) maybe make it available as generic docker image?

@KevinSheedy
Copy link

@KevinSheedy thanks a lot. Do you have any plans to make it a little bit more independent from the infrastructure used by unpkg (google cloud services and cloudflare) maybe make it available as generic docker image?

There's no dependency on Google Cloud Services and Cloudflare, see flag ENABLE_CLOUDFLARE which defaults to false. The only dependency is on nodejs. I've tested it on MacOS and Windows.

This means there is no cdn/caching by default.

@timomayer
Copy link

thanks for clarification :) last question, is your version open-source on github?

@KevinSheedy
Copy link

thanks for clarification :) last question, is your version open-source on github?

Yes, it's linked in the PR back to the main repo:
https://github.com/KevinSheedy/unpkg-server

It's the minimum changeset I needed to get it running in my own organisation. I'm hoping that my PR or something similar will be adopted back into the main project, negating the need for my fork.

@LBWright
Copy link

Any word on this solution?

@mjackson
Copy link
Owner

mjackson commented Feb 4, 2020

I'm not interested in including this functionality for now. Please feel free to fork away if you'd like to host it yourself. This whole codebase is going to be converted to use Cloudflare workers sometime soon, so the Express app will likely be disappearing.

@mjackson mjackson closed this as completed Feb 4, 2020
@wenerme
Copy link

wenerme commented Oct 8, 2022

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