-
Notifications
You must be signed in to change notification settings - Fork 656
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
Comments
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? |
Simply a kind of... public_storage: ./public_storage
private_storage: ./private_storage Thanks for your work. |
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' |
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. |
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
The text was updated successfully, but these errors were encountered: