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

Storage separation between public cached modules and private modules #35

Closed
LoicMahieu opened this issue Jan 9, 2014 · 4 comments
Closed

Comments

@LoicMahieu
Copy link

Stored public modules are just for cache. Private modules are critic and must be backuped in order to completely restore sinopia if a anything happend.

At the moment, I think that Sinopia store all modules in the same storage directory.
Is it planned? Or is it just possible without big change?

Thanks

@rlidwka
Copy link
Owner

rlidwka commented Jan 10, 2014

Right now it's possible to run 2 different sinopia instances. First one is where you publish modules (no uplinks configured at all, no cache), and second one is where you install from (2 uplinks: first instance and npmjs). If you have it on two different servers, cache would be a bonus backup. :)

But I suppose there's no harm in adding that feature. How do you think the configuration file would look like?

@LoicMahieu
Copy link
Author

Simply a kind of...

public_storage: ./public_storage
private_storage: ./private_storage

Thanks for your work.

@rlidwka
Copy link
Owner

rlidwka commented Jan 13, 2014

Now it can be done with config like this:

packages:
  'local-*':
    allow_access: somebody
    allow_publish: somebody
    storage: 'private_storage'

  '*':
    allow_access: somebody
    proxy: npmjs
    storage: 'public_storage'

@rlidwka
Copy link
Owner

rlidwka commented Jan 13, 2014

Just for the information, packages aren't really divided to "private" and "public".

If sinopia is configured to proxy all requests to npmjs, okay it's public. If it's configured to allow publishing packages by somebody, okay it's private. But it can be configured to mix public versions of certain package with privately published versions, and I don't really know how to call that...

So I added a feature allowing to override "storage" property to a certain group of packages as shown above. It looks like a bit more flexible and a bit less misleading approach.

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

2 participants