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

Move to Docker #36

Open
mjackson opened this issue May 25, 2017 · 8 comments
Open

Move to Docker #36

mjackson opened this issue May 25, 2017 · 8 comments

Comments

@mjackson
Copy link
Owner

From @mjackson on January 19, 2017 18:29

One of the immediately actionable ideas that came out of #65 is to create a standalone development server for unpkg, so people can run it on their own machines. I envision this being a small binary with the following API:

unpkg [registryURL] [-p port]

This would launch an HTTP server on the given port that serves packages out of npm. If we also include the index page, it could possibly be used to serve unpkg.com as well.

Copied from original issue: unpkg/express-unpkg#66

@mjackson
Copy link
Owner Author

From @alexisvincent on January 20, 2017 19:23

Awesome :D once this is done let me know and I'll make an automated docker container

@mjackson mjackson self-assigned this May 25, 2017
@export-mike
Copy link

@mjackson Hey!
This would be neat 👍
I think the one thing stopping it from being a simple install and start flow npm i -g unpkg && unpkgright now is the redis process.env.REDIS_URL not being set. Previously I've left the redis package to resolve to localhost:6380 when its not set.

we could do something similar. Just wondering what your thoughts are on how to load default env variables for a standalone server?
the cli would allow you to override the default:
unpkg [registryURL] [-p port] [-r redisURL]

@mjackson mjackson removed their assignment Aug 31, 2017
@mjackson
Copy link
Owner Author

Hey @export-mike :)

As I've thought more about this, I think the best route forward would be to build a Docker container that automatically runs everything unpkg needs, including Redis. That would be more portable than a node script and would let people run it on a variety of infrastructures.

Some work was done in c714b6b, but I don't know enough about Docker to know if we can use any of that or not.

@alexisvincent
Copy link

@mjackson I’ve worked a lot with docker (since pre 1.0 days) so can offer some guidance here.

Having multiple processes running in a container is not ideal, prevents horizontal scaling and means you need to also run a process scheduler inside the container (like systemd).

Happy to containerise the project you if the primatives are in place.

@mjackson mjackson changed the title Standalone server Move to Docker Sep 3, 2017
@tex0l
Copy link

tex0l commented Oct 31, 2017

It'd be awesome to have an unpkg docker configuration for people who might want to have their own CDN server over their self-hosted registry.

I believe the best way to do it would be to dockerize unpkg alone without Redis and use docker-compose (which allows a multi-container application) to add a redis on top of it. I'm not an expert with Docker nor the architecture of unpkg so I won't be able to help much for making this configuration, but I'd definitely be a user.

@xtuc
Copy link

xtuc commented Oct 31, 2017

I agree with @tex0l. The containers should only one app (either the web server or the database). docker-compose allows you to easily describe links between containers and allows you to scale any container.

@styfle styfle mentioned this issue Jul 3, 2018
@nihakue
Copy link

nihakue commented Nov 15, 2018

Has this work been abandoned? What's still outstanding? I can see that you're now using Docker for the dev server. #98 is very compelling for our team, and I'd be happy to help make this happen if it still seems like the best way to make custom registries a reality.

@magalhas
Copy link

Any update on this?

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

7 participants