forked from rlidwka/sinopia
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Soyhuce/develop
Minor Release v0.1.0
- Loading branch information
Showing
26 changed files
with
254 additions
and
947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
/package.json | ||
npm-debug.log | ||
sinopia-*.tgz | ||
cinabre-*.tgz | ||
.DS_Store | ||
|
||
### | ||
bin/** | ||
!bin/sinopia | ||
!bin/cinabre | ||
test-storage* | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
node_modules | ||
package.json | ||
npm-debug.log | ||
sinopia-*.tgz | ||
cinabre-*.tgz | ||
|
||
### | ||
bin/** | ||
!bin/sinopia | ||
!bin/cinabre | ||
test-storage* | ||
|
||
/.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' | ||
- '0.12' | ||
- '1' | ||
- '2' | ||
- 'iojs' | ||
- '0.10' | ||
- '4' | ||
- '5' | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-4.9 | ||
- g++-4.9 | ||
env: | ||
- CC=gcc-4.9 CXX=g++-4.9 | ||
sudo: false | ||
matrix: | ||
allow_failures: | ||
- node_js: '0.10' | ||
- node_js: 'iojs' | ||
fast_finish: true | ||
script: npm install . && npm run test-travis | ||
script: npm install && npm run test-travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:5 | ||
RUN mkdir -p /opt/cinabre && mkdir -p /opt/cinabre/volume | ||
WORKDIR /opt/cinabre | ||
ADD package.json /opt/cinabre/ | ||
RUN npm install | ||
ADD . /opt/cinabre | ||
CMD ["/opt/cinabre/docker/start.sh"] | ||
EXPOSE 4873 | ||
VOLUME /opt/cinabre/volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
`sinopia` - a private/caching npm repository server | ||
`cinabre` - a private/caching npm repository server | ||
|
||
# This forks aims to merge useful pull requests from original repository which appears to be abandoned (last commit oct 2015). | ||
### This forks aims to merge useful pull requests from original sinopia repository which appears to be abandoned (last commit oct 2015). | ||
|
||
[![npm version badge](https://img.shields.io/npm/v/sinopia.svg)](https://www.npmjs.org/package/sinopia) | ||
[![travis badge](http://img.shields.io/travis/rlidwka/sinopia.svg)](https://travis-ci.org/rlidwka/sinopia) | ||
[![downloads badge](http://img.shields.io/npm/dm/sinopia.svg)](https://www.npmjs.org/package/sinopia) | ||
<!-- [![npm version badge](https://img.shields.io/npm/v/cinabre.svg)](https://www.npmjs.org/package/cinabre) --> | ||
[![travis badge](http://img.shields.io/travis/Soyhuce/cinabre.svg)](https://travis-ci.org/Soyhuce/cinabre) | ||
<!-- [![downloads badge](http://img.shields.io/npm/dm/cinabre.svg)](https://www.npmjs.org/package/cinabre) --> | ||
|
||
It allows you to have a local npm registry with zero configuration. You don't have to install and replicate an entire CouchDB database. Sinopia keeps its own small database and, if a package doesn't exist there, it asks npmjs.org for it keeping only those packages you use. | ||
It allows you to have a local npm registry with zero configuration. You don't have to install and replicate an entire CouchDB database. Cinabre keeps its own small database and, if a package doesn't exist there, it asks npmjs.org for it keeping only those packages you use. | ||
|
||
<p align="center"><img src="https://f.cloud.github.com/assets/999113/1795553/680177b2-6a1d-11e3-82e1-02193aa4e32e.png"></p> | ||
|
||
|
@@ -36,8 +36,8 @@ It allows you to have a local npm registry with zero configuration. You don't ha | |
```bash | ||
# installation and starting (application will create default | ||
# config in config.yaml you can edit later) | ||
$ npm install -g sinopia | ||
$ sinopia | ||
$ npm install -g cinabre | ||
$ cinabre | ||
|
||
# npm configuration | ||
$ npm set registry http://localhost:4873/ | ||
|
@@ -51,15 +51,18 @@ Now you can navigate to [http://localhost:4873/](http://localhost:4873/) where y | |
|
||
### Docker | ||
|
||
A Sinopia docker image [is available](https://registry.hub.docker.com/u/rnbwd/sinopia/) | ||
```Bash | ||
docker build -t cinabre . | ||
docker run -d --name cinabre -p 4873:4873 -v /path/to/cinabre-volume:/opt/cinabre/volume cinabre | ||
``` | ||
|
||
### Chef | ||
|
||
A Sinopia Chef cookbook [is available at Opscode community](http://community.opscode.com/cookbooks/sinopia) source: https://github.com/BarthV/sinopia-cookbook | ||
A Cinabre Chef cookbook [is available at Opscode community](http://community.opscode.com/cookbooks/sinopia) source: https://github.com/BarthV/sinopia-cookbook | ||
|
||
### Puppet | ||
|
||
A Sinopia puppet module [is available at puppet forge](http://forge.puppetlabs.com/saheba/sinopia) source: https://github.com/saheba/puppet-sinopia | ||
A Cinabre puppet module [is available at puppet forge](http://forge.puppetlabs.com/saheba/sinopia) source: https://github.com/saheba/puppet-cinopia | ||
|
||
## Configuration | ||
|
||
|
@@ -71,7 +74,7 @@ When you start a server, it auto-creates a config file. | |
npm adduser --registry http://localhost:4873/ | ||
``` | ||
|
||
This will prompt you for user credentials which will be saved on the Sinopia server. | ||
This will prompt you for user credentials which will be saved on the Cinabre server. | ||
|
||
## Using private packages | ||
|
||
|
@@ -81,7 +84,7 @@ It is recommended that you define a prefix for your private packages, for exampl | |
|
||
## Using public packages from npmjs.org | ||
|
||
If some package doesn't exist in the storage, server will try to fetch it from npmjs.org. If npmjs.org is down, it serves packages from cache pretending that no other packages exist. Sinopia will download only what's needed (= requested by clients), and this information will be cached, so if client will ask the same thing second time, it can be served without asking npmjs.org for it. | ||
If some package doesn't exist in the storage, server will try to fetch it from npmjs.org. If npmjs.org is down, it serves packages from cache pretending that no other packages exist. Cinabre will download only what's needed (= requested by clients), and this information will be cached, so if client will ask the same thing second time, it can be served without asking npmjs.org for it. | ||
|
||
Example: if you successfully request [email protected] from this server once, you'll able to do that again (with all it's dependencies) anytime even if npmjs.org is down. But say [email protected] will not be downloaded until it's actually needed by somebody. And if npmjs.org is offline, this server would say that only [email protected] (= only what's in the cache) is published, but nothing else. | ||
|
||
|
@@ -93,7 +96,7 @@ There's two options here: | |
|
||
1. You want to create a separate fork and stop synchronizing with public version. | ||
|
||
If you want to do that, you should modify your configuration file so sinopia won't make requests regarding this package to npmjs anymore. Add a separate entry for this package to *config.yaml* and remove `npmjs` from `proxy_access` list and restart the server. | ||
If you want to do that, you should modify your configuration file so cinabre won't make requests regarding this package to npmjs anymore. Add a separate entry for this package to *config.yaml* and remove `npmjs` from `proxy_access` list and restart the server. | ||
|
||
When you publish your package locally, you should probably start with version string higher than existing one, so it won't conflict with existing package in the cache. | ||
|
||
|
@@ -103,7 +106,7 @@ There's two options here: | |
|
||
## Compatibility | ||
|
||
Sinopia aims to support all features of a standard npm client that make sense to support in private repository. Unfortunately, it isn't always possible. | ||
Cinabre aims to support all features of a standard npm client that make sense to support in private repository. Unfortunately, it isn't always possible. | ||
|
||
Basic features: | ||
|
||
|
@@ -119,7 +122,7 @@ Advanced package control: | |
User management: | ||
|
||
- Registering new users (npm adduser {newuser}) - supported | ||
- Transferring ownership (npm owner add {user} {pkg}) - not supported, sinopia uses its own acl management system | ||
- Transferring ownership (npm owner add {user} {pkg}) - not supported, cinabre uses its own acl management system | ||
|
||
Misc stuff: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ToDo | ||
|
||
- ~~Use [marked](https://github.com/chjj/marked) instead of render-readme for Markdown syntax~~ | ||
- Switch from express-json5 to express body-parser | ||
- Do something with sinopia-htpasswd |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# This is the default config file. It allows all users to do anything, | ||
# so don't use it on production systems. | ||
# | ||
# Look here for more config file examples: | ||
# https://github.com/soyhuce/cinabre/tree/master/conf | ||
# | ||
|
||
# path to a directory with all packages | ||
storage: /opt/cinabre/volume/storage | ||
|
||
auth: | ||
htpasswd: | ||
file: /opt/cinabre/volume/htpasswd | ||
# Maximum amount of users allowed to register, defaults to "+inf". | ||
# You can set this to -1 to disable registration. | ||
#max_users: 1000 | ||
|
||
# a list of other known repositories we can talk to | ||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
|
||
packages: | ||
'@*/*': | ||
# scoped packages | ||
access: $all | ||
publish: $authenticated | ||
|
||
'*': | ||
# allow all users (including non-authenticated users) to read and | ||
# publish all packages | ||
# | ||
# you can specify usernames/groupnames (depending on your auth plugin) | ||
# and three keywords: "$all", "$anonymous", "$authenticated" | ||
access: $all | ||
|
||
# allow all known users to publish packages | ||
# (anyone can register by default, remember?) | ||
publish: $authenticated | ||
|
||
# if package is not available locally, proxy requests to 'npmjs' registry | ||
proxy: npmjs | ||
|
||
# log settings | ||
logs: | ||
- {type: stdout, format: pretty, level: http} | ||
#- {type: file, path: sinopia.log, level: info} | ||
|
||
listen: | ||
- 0.0.0.0:4873 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
if [ ! -f /opt/cinabre/volume/config.yaml ]; then | ||
cp /opt/cinabre/conf/docker.yaml /opt/cinabre/volume/config.yaml | ||
fi | ||
cat /opt/cinabre/volume/config.yaml | ||
node /opt/cinabre/bin/cinabre --config /opt/cinabre/volume/config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
require('es6-shim') | ||
module.exports = require('./lib') | ||
|
||
/**package | ||
{ "name": "sinopia", | ||
"version": "0.0.0", | ||
"dependencies": {"js-yaml": "*"}, | ||
"scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"} | ||
} | ||
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.