bower / registry

The Bower registry
https://registry.bower.io/packages
MIT License
292 stars 66 forks source link

add Dockerfile #93

Closed patrickkettner closed 9 years ago

patrickkettner commented 10 years ago

fixes #42

There are a few things I would like to change before this gets merged (assuming it isn't too terrible to even be considered :D) The ids are just randomly generated numbers, and the timestamp is just when the DB is generated. Could we expose this on /packages, or perhaps another endpoint that actually shows id and timestamp?

patrickkettner commented 10 years ago

ping @benschwarz @sindresorhus

sheerun commented 10 years ago

I think it's not necessary to bundle PostgreSQL.

DATABASE_URL env variable should be enough.

patrickkettner commented 10 years ago

Ah, I thought the intention was a registry in a box, which to me would mean the database and the reigstry. Since the less obvious steps involve populating the database, it seems useful to have it included

sheerun commented 10 years ago

Populating database is fine to stay. I just don't see a reason to bundle PostgreSQL. You usually want to use separate container or host for database anyway. Am I wrong?

patrickkettner commented 10 years ago

yeah, probably should be a separate container.

will update

sheerun commented 10 years ago

You can also inherit from official node.js container:

http://blog.docker.com/2014/09/docker-hub-official-repos-announcing-language-stacks/

On Fri, Sep 26, 2014 at 6:36 PM, patrick kettner notifications@github.com wrote:

yeah, probably should be a separate container.

will update

— Reply to this email directly or view it on GitHub https://github.com/bower/registry/pull/93#issuecomment-56986235.

patrickkettner commented 10 years ago

yeah, this is just that container, and the postgresql container, munged together. I'll inherit form the node one since im ditching postgres

sheerun commented 10 years ago

I'd also put the idempotent script creating database schema to bin/setup and script importing database from official bower registry to bin/import. Schema file can be db/schema.sql or embedded in script.

sheerun commented 10 years ago

I'd also add start script to package.json.

sindresorhus commented 9 years ago

ping @patrickkettner :arrow_up:

sheerun commented 9 years ago

I properly configured project and made setup easy. No need for Dockerfile: https://github.com/bower/registry/commit/66e074a506c18be83ae3533c9a59dd11b54ba5e4