1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-24 21:15:51 +01:00

docs: relocate docker-examples to 5.x (#1990)

* docs: relocate docker-examples to 5.x

* chore: update readme

* chore: remove license

we have already one at root
This commit is contained in:
Juan Picado 2020-10-31 09:40:37 +01:00
parent e83e500b80
commit 04b19262d0
124 changed files with 96557 additions and 9 deletions

@ -10,29 +10,31 @@ For more information about the **Helm** Chart, please check it [owns repo](https
The following examples aim to be demonstrative and can be either improved or updated.
### Verdaccio 4
### Docker
#### Proxies
- [Docker + Apache + Verdaccio](v4/apache-verdaccio/README.md)
- [Docker + Nginx + Verdaccio](v4/reverse_proxy/nginx/README.md)
- [Docker + https-portal Example](v4/https-portal-example/README.md)
- [Docker + Apache + Verdaccio](apache-verdaccio/README.md)
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
- [Docker + https-portal Example](https-portal-example/README.md)
#### Plugins
- [Docker + Uplinks Multi Registry](v4/multi-registry-uplink/README.md)
- [Docker + Local Storage](v4/docker-local-storage-volume/readme.md)
- [Docker + External Plugins](v4/docker-plugin-external/README.md)
- [Docker + Uplinks Multi Registry](multi-registry-uplink/README.md)
- [Docker + Local Storage](docker-local-storage-volume/readme.md)
- [Docker + External Plugins](docker-plugin-external/README.md)
#### Auth
- [Docker + LDAP (OpenLDAP) Server + Verdaccio 4](v4/ldap-verdaccio/readme.md) by **@kopax**
- [Docker + LDAP (OpenLDAP) Server + Verdaccio 3](ldap-verdaccio/readme.md)
- [Docker + LDAP (OpenLDAP) Server + Verdaccio 4](ldap-verdaccio-v4/readme.md) by **@kopax**
- [Docker + Gitlab](gitlab-verdaccio/README.md)
- [Docker + Active Directory](https://github.com/Mateus-Oli/verdaccio-ad-docker)
#### Storage
- [Docker + AWS S3 Plugin(localstack) + Verdaccio 4](v4/amazon-s3-docker-example/v4/README.md)
- [Docker + AWS S3 Plugin(localstack) + Verdaccio 4](amazon-s3-docker-example/v4/README.md)
- [Docker + AWS S3 Plugin(localstack) + Verdaccio 3](amazon-s3-docker-example/v3/README.md)
- [Docker + Minio](https://github.com/barolab/verdaccio-minio/tree/master/example)
### Kubernetes
@ -40,6 +42,8 @@ The following examples aim to be demonstrative and can be either improved or upd
- Kubernetes (minikube) + Verdaccio (Basic Configuration)
- Kubernetes Helm and Verdaccio Chart (Basic Tutorial)
![alt verdaccio](https://www.verdaccio.org/img/devops_support_grey.png 'verdaccio devops')
### External
- [

@ -0,0 +1,9 @@
# Amazon S3 Bucket (Localstack) and Verdaccio
Verdaccio running with [Localstack](https://github.com/localstack/localstack) provides an easy-to-use test/mocking framework for developing cloud applications (AWS S3 in our example).
## Usage
```
docker-compose up --force-recreate --build --always-recreate-deps
```

@ -0,0 +1,29 @@
storage: /verdaccio/storage
store:
aws-s3-storage:
bucket: localstack.s3.plugin.test
keyPrefix: docker-test-prefix
region: eu-west-2
endpoint: http://localstack-s3:4572
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
logs:
- { type: stdout, format: pretty, level: trace }
listen:
- 0.0.0.0:4873

@ -0,0 +1,59 @@
version: '2.1'
services:
aws-resources:
build: localStack-resources/
environment:
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
- AWS_DEFAULT_REGION=eu-west-2
- AWS_S3_ENDPOINT=http://localstack-s3:4572
depends_on:
localstack-s3:
condition: service_healthy
links:
- localstack-s3
localstack-s3:
image: localstack/localstack:latest
container_name: localstack-s3-v3
environment:
- DEBUG=0
- SERVICES=s3
- DEFAULT_REGION=eu-west-2
- DATA_DIR=/tmp/localstack/data
ports:
- '4572:4572'
- '9999:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4572']
interval: 15s
timeout: 10s
retries: 4
volumes:
- localstack-data:/tmp/localstack
verdaccio:
container_name: verdaccio-s3-plugin-v3
build: s3Plugin/
environment:
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
- AWS_DEFAULT_REGION=eu-west-2
- AWS_S3_ENDPOINT=http://localstack-s3:4572
- AWS_S3_PATH_STYLE=true
ports:
- '4874:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
depends_on:
localstack-s3:
condition: service_healthy
links:
- localstack-s3
volumes:
verdaccio:
driver: local
aws-resources:
driver: local
localstack-data:
name: localstack-data

@ -0,0 +1,10 @@
FROM python:2.7
ENV AWS_ACCESS_KEY_ID='[something]'
ENV AWS_SECRET_ACCESS_KEY='[something]'
ENV AWS_S3_ENDPOINT='http://localstack-s3:4572'
RUN pip install awscli
COPY entry.sh /entry.sh
RUN chmod +x /entry.sh
ENTRYPOINT ["/entry.sh"]

@ -0,0 +1,3 @@
#!/bin/bash
aws --endpoint-url http://localstack-s3:4572 s3 mb s3://localstack.s3.plugin.test --region eu-west-2

@ -0,0 +1,3 @@
FROM verdaccio/verdaccio:3
RUN npm i && npm install verdaccio-aws-s3-storage

@ -0,0 +1,51 @@
{
"name": "@scope/example",
"versions": {
"1.0.0": {
"name": "@scope/example",
"version": "1.0.0",
"description": "exampled scoped module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"example"
],
"author": {
"name": "Juan Picado"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1"
},
"_id": "@scope/example@1.0.0",
"_npmVersion": "6.3.0",
"_nodeVersion": "10.1.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-UrpRhmCAwyGF2pWWd+fGDN8tFsVcCoLmK/qHaVAamphR+E4ZUjGf6N5GGgneFwbSeZ0FQrDYtUTPKrysxGIihQ==",
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"tarball": "http://localhost:4873/@scope/example/-/@scope/example-1.0.0.tgz"
}
}
},
"time": {
"modified": "2018-09-22T17:08:29.339Z",
"created": "2018-09-22T17:08:29.339Z",
"1.0.0": "2018-09-22T17:08:29.339Z"
},
"dist-tags": {
"latest": "1.0.0"
},
"_uplinks": {},
"_distfiles": {},
"_attachments": {
"example-1.0.0.tgz": {
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"version": "1.0.0"
}
},
"_rev": "9-664a1a1732f461c8",
"readme": "ERROR: No README data found!"
}

@ -0,0 +1,909 @@
{
"name": "ping",
"versions": {
"0.1.0": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.0",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": "~0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"_id": "ping@0.1.0",
"_engineSupported": false,
"_npmVersion": "1.0.104",
"_nodeVersion": "v0.4.12",
"_defaultsLoaded": true,
"dist": {
"shasum": "19c56eeac7f5bf642c8b428d7c716863a307838d",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.0.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.1": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.1",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": "~0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"_id": "ping@0.1.1",
"_engineSupported": false,
"_npmVersion": "1.0.104",
"_nodeVersion": "v0.4.12",
"_defaultsLoaded": true,
"dist": {
"shasum": "47cb448a80b20f39b363928d0545e665f401b064",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.1.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.2": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.2",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_id": "ping@0.1.2",
"dist": {
"shasum": "e09601ef43931fa5979404c24338c82f091063e5",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.2.tgz"
},
"_from": ".",
"_npmVersion": "1.2.17",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.3": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.3",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"_id": "ping@0.1.3",
"_engineSupported": true,
"_npmVersion": "1.0.106",
"_nodeVersion": "v0.6.2",
"_defaultsLoaded": true,
"dist": {
"shasum": "34707cd5ca0962978f83887b520f1a7bd0edcffb",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.3.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.4": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.4",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"_id": "ping@0.1.4",
"_engineSupported": true,
"_npmVersion": "1.0.106",
"_nodeVersion": "v0.6.2",
"_defaultsLoaded": true,
"dist": {
"shasum": "097404db96ed8c988276d8b7c1a4585e67751995",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.4.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.5": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.5",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_id": "ping@0.1.5",
"dist": {
"shasum": "4d85eea64c31b627b893587858b121cae8a0714e",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.5.tgz"
},
"_from": ".",
"_npmVersion": "1.2.17",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.6": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.6",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_id": "ping@0.1.6",
"dist": {
"shasum": "df14cca9b2a5825d26e66d8e5cefb7c937a9e3d0",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.6.tgz"
},
"_from": ".",
"_npmVersion": "1.2.17",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.7": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.7",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {},
"devDependencies": {},
"main": "index.js",
"_id": "ping@0.1.7",
"dist": {
"shasum": "1aa3c0c0a0d63a2e097c1011becff2c397d2e646",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.7.tgz"
},
"_from": ".",
"_npmVersion": "1.2.17",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.8": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.8",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {
"q": "^1.0.1"
},
"devDependencies": {},
"main": "index.js",
"_id": "ping@0.1.8",
"dist": {
"shasum": "128576ec5c877adb9c31d0c53d3f54a293c4843b",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.8.tgz"
},
"_from": ".",
"_npmVersion": "1.2.17",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.1.9": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.9",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {
"q": "1.x"
},
"devDependencies": {},
"main": "index.js",
"gitHead": "0b56bd49d2629156d1795e16a7f7755980aaea3d",
"bugs": {
"url": "https://github.com/danielzzz/node-ping/issues"
},
"_id": "ping@0.1.9",
"scripts": {},
"_shasum": "843808f4cf1db6f587b56edc40778099ef08a883",
"_from": ".",
"_npmVersion": "1.4.23",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"dist": {
"shasum": "843808f4cf1db6f587b56edc40778099ef08a883",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.9.tgz"
},
"directories": {}
},
"0.1.10": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.1.10",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {
"q": "1.x"
},
"devDependencies": {},
"main": "index.js",
"gitHead": "932455592c679138750819a5b4a87cf3b58166ab",
"bugs": {
"url": "https://github.com/danielzzz/node-ping/issues"
},
"_id": "ping@0.1.10",
"scripts": {},
"_shasum": "ff9706cc7f9485432f21f67eb71e719716b350d4",
"_from": ".",
"_npmVersion": "2.7.4",
"_nodeVersion": "0.12.2",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"dist": {
"shasum": "ff9706cc7f9485432f21f67eb71e719716b350d4",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.1.10.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"directories": {}
},
"0.2.0": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"contributors": [
{
"name": "Mond Wan",
"email": "mondwan.1015@gmail.com"
},
{
"name": "dougluce",
"email": "doug@tenousiperochhelical.con.com"
},
{
"name": "weihua44"
},
{
"name": "GermanBluefox"
},
{
"name": "mabukar"
},
{
"name": "microacup",
"email": "xiangmain@gmail.com"
},
{
"name": "Andrew Fadeev"
},
{
"name": "Joshua Pruitt",
"email": "firefly777@gmail.com"
},
{
"name": "Stephan van Rooij",
"email": "stephan@svrooij.nl",
"url": "http://svrooij.nl"
},
{
"name": "Krispin Schulz",
"email": "krispinone@googlemail.com",
"url": "http://kr1sp1n.io"
},
{
"name": "Kathy Hill"
},
{
"name": "mrMuppet"
},
{
"name": "Adam Heath",
"email": "adam@adamheath.me",
"url": "http://www.adamheath.me"
}
],
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.2.0",
"homepage": "http://github.com/danielzzz/node-ping",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.6.2"
},
"dependencies": {
"q": "1.x"
},
"devDependencies": {},
"main": "index.js",
"gitHead": "534d58449aa79dbdd95ccd46ad324b43088ccce4",
"bugs": {
"url": "https://github.com/danielzzz/node-ping/issues"
},
"_id": "ping@0.2.0",
"scripts": {},
"_shasum": "461420f2fc286e9742c2f5bd0c371390306baba5",
"_from": ".",
"_npmVersion": "3.5.2",
"_nodeVersion": "4.2.6",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"dist": {
"shasum": "461420f2fc286e9742c2f5bd0c371390306baba5",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.2.0.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/ping-0.2.0.tgz_1471874385025_0.6088904982898384"
},
"directories": {}
},
"0.2.1": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"scripts": {
"test": "mocha"
},
"contributors": [
{
"name": "Mond Wan",
"email": "mondwan.1015@gmail.com"
},
{
"name": "dougluce",
"email": "doug@tenousiperochhelical.con.com"
},
{
"name": "weihua44"
},
{
"name": "GermanBluefox"
},
{
"name": "mabukar"
},
{
"name": "microacup",
"email": "xiangmain@gmail.com"
},
{
"name": "Andrew Fadeev"
},
{
"name": "Joshua Pruitt",
"email": "firefly777@gmail.com"
},
{
"name": "Stephan van Rooij",
"email": "stephan@svrooij.nl",
"url": "http://svrooij.nl"
},
{
"name": "Krispin Schulz",
"email": "krispinone@googlemail.com",
"url": "http://kr1sp1n.io"
},
{
"name": "Kathy Hill"
},
{
"name": "mrMuppet"
},
{
"name": "Adam Heath",
"email": "adam@adamheath.me",
"url": "http://www.adamheath.me"
},
{
"name": "BlessJah",
"email": "blessjah@jacekowski.org"
}
],
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.2.1",
"homepage": "http://github.com/danielzzz/node-ping",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.8"
},
"dependencies": {
"q": "1.x"
},
"devDependencies": {
"chai": "2.3.0",
"mocha": "2.5.3",
"sinon": "1.17.6"
},
"main": "index.js",
"gitHead": "8d81f633927cc45666c2af9709782db63a94d732",
"bugs": {
"url": "https://github.com/danielzzz/node-ping/issues"
},
"_id": "ping@0.2.1",
"_shasum": "2c357e5ab050e8afbe880b189f50d18899435364",
"_from": ".",
"_npmVersion": "3.5.2",
"_nodeVersion": "4.2.6",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"dist": {
"shasum": "2c357e5ab050e8afbe880b189f50d18899435364",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.2.1.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/ping-0.2.1.tgz_1476861370110_0.7665925829205662"
},
"directories": {}
},
"0.2.2": {
"author": {
"name": "danielzzz",
"email": "daniel@zelisko.net",
"url": "http://daniel.zelisko.net"
},
"scripts": {
"test": "grunt test"
},
"contributors": [
{
"name": "Mond Wan",
"email": "mondwan.1015@gmail.com"
},
{
"name": "dougluce",
"email": "doug@tenousiperochhelical.con.com"
},
{
"name": "weihua44"
},
{
"name": "GermanBluefox"
},
{
"name": "mabukar"
},
{
"name": "microacup",
"email": "xiangmain@gmail.com"
},
{
"name": "Andrew Fadeev"
},
{
"name": "Joshua Pruitt",
"email": "firefly777@gmail.com"
},
{
"name": "Stephan van Rooij",
"email": "stephan@svrooij.nl",
"url": "http://svrooij.nl"
},
{
"name": "Krispin Schulz",
"email": "krispinone@googlemail.com",
"url": "http://kr1sp1n.io"
},
{
"name": "Kathy Hill"
},
{
"name": "mrMuppet"
},
{
"name": "Adam Heath",
"email": "adam@adamheath.me",
"url": "http://www.adamheath.me"
},
{
"name": "BlessJah",
"email": "blessjah@jacekowski.org"
},
{
"name": "jritsema"
}
],
"name": "ping",
"description": "a simple wrapper for ping",
"version": "0.2.2",
"homepage": "http://github.com/danielzzz/node-ping",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/danielzzz/node-ping.git"
},
"engines": {
"node": ">=0.8"
},
"dependencies": {
"q": "1.x",
"underscore": "^1.8.3"
},
"devDependencies": {
"babel-eslint": "^7.0.0",
"chai": "2.3.0",
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-config-eslint": "^3.0.0",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"glob": "^7.1.1",
"grunt": "^1.0.1",
"grunt-mocha-test": "^0.13.2",
"gruntify-eslint": "^3.1.0",
"mocha": "2.5.3",
"sinon": "1.17.6"
},
"main": "index.js",
"gitHead": "d07809a481d09f8fc672b749b90a38ad8bb0cb49",
"bugs": {
"url": "https://github.com/danielzzz/node-ping/issues"
},
"_id": "ping@0.2.2",
"_shasum": "180fb7508c1dc74793849bce35c8073f9965bce2",
"_from": ".",
"_npmVersion": "4.1.2",
"_nodeVersion": "7.5.0",
"_npmUser": {
"name": "danielzzz",
"email": "daniel@zelisko.net"
},
"dist": {
"shasum": "180fb7508c1dc74793849bce35c8073f9965bce2",
"tarball": "https://registry.npmjs.org/ping/-/ping-0.2.2.tgz"
},
"maintainers": [
{
"name": "danielzzz",
"email": "daniel@zelisko.net"
}
],
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/ping-0.2.2.tgz_1487613895565_0.5315895858220756"
},
"directories": {}
}
},
"time": {
"modified": "2018-02-22T20:30:28.700Z",
"created": "2011-11-23T12:31:22.367Z",
"0.1.0": "2011-11-23T12:31:24.677Z",
"0.1.1": "2011-11-23T13:04:23.171Z",
"0.1.2": "2013-04-05T10:36:12.537Z",
"0.1.3": "2013-04-24T10:28:26.500Z",
"0.1.4": "2013-05-02T07:41:11.570Z",
"0.1.5": "2013-09-03T10:28:31.462Z",
"0.1.6": "2013-09-05T10:59:10.262Z",
"0.1.7": "2013-12-02T10:11:18.289Z",
"0.1.8": "2014-04-10T09:58:24.984Z",
"0.1.9": "2014-11-24T08:38:13.072Z",
"0.1.10": "2015-05-14T12:35:49.690Z",
"0.2.0": "2016-08-22T13:59:46.752Z",
"0.2.1": "2016-10-19T07:16:11.662Z",
"0.2.2": "2017-02-20T18:04:56.129Z"
},
"dist-tags": {
"latest": "0.2.2"
},
"_uplinks": {
"npmjs": {
"etag": "W/\"5791704fb910b1195c62db602cdacd88\"",
"fetched": 1549740249883
}
},
"_distfiles": {
"ping-0.1.0.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.0.tgz",
"sha": "19c56eeac7f5bf642c8b428d7c716863a307838d",
"registry": "npmjs"
},
"ping-0.1.1.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.1.tgz",
"sha": "47cb448a80b20f39b363928d0545e665f401b064",
"registry": "npmjs"
},
"ping-0.1.2.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.2.tgz",
"sha": "e09601ef43931fa5979404c24338c82f091063e5",
"registry": "npmjs"
},
"ping-0.1.3.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.3.tgz",
"sha": "34707cd5ca0962978f83887b520f1a7bd0edcffb",
"registry": "npmjs"
},
"ping-0.1.4.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.4.tgz",
"sha": "097404db96ed8c988276d8b7c1a4585e67751995",
"registry": "npmjs"
},
"ping-0.1.5.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.5.tgz",
"sha": "4d85eea64c31b627b893587858b121cae8a0714e",
"registry": "npmjs"
},
"ping-0.1.6.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.6.tgz",
"sha": "df14cca9b2a5825d26e66d8e5cefb7c937a9e3d0",
"registry": "npmjs"
},
"ping-0.1.7.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.7.tgz",
"sha": "1aa3c0c0a0d63a2e097c1011becff2c397d2e646",
"registry": "npmjs"
},
"ping-0.1.8.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.8.tgz",
"sha": "128576ec5c877adb9c31d0c53d3f54a293c4843b",
"registry": "npmjs"
},
"ping-0.1.9.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.9.tgz",
"sha": "843808f4cf1db6f587b56edc40778099ef08a883",
"registry": "npmjs"
},
"ping-0.1.10.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.1.10.tgz",
"sha": "ff9706cc7f9485432f21f67eb71e719716b350d4",
"registry": "npmjs"
},
"ping-0.2.0.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.2.0.tgz",
"sha": "461420f2fc286e9742c2f5bd0c371390306baba5",
"registry": "npmjs"
},
"ping-0.2.1.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.2.1.tgz",
"sha": "2c357e5ab050e8afbe880b189f50d18899435364",
"registry": "npmjs"
},
"ping-0.2.2.tgz": {
"url": "https://registry.npmjs.org/ping/-/ping-0.2.2.tgz",
"sha": "180fb7508c1dc74793849bce35c8073f9965bce2",
"registry": "npmjs"
}
},
"_attachments": {},
"_rev": "1-e34fefbf6078c843",
"readme": "#NODE-PING\n\na ping wrapper for nodejs\n\n@last-modified: 2016-10-21 12:43\n\n#LICENSE MIT\n\n(C) Daniel Zelisko\n\nhttp://github.com/danielzzz/node-ping\n\n#DESCRIPTION\n\nnode-ping is a simple wrapper for the system ping utility\n\n#INSTALLATION\n\nnpm install ping\n\n#USAGE\n\nBelow are examples extracted from `examples`\n\n##Tradition calls\n\n```js\nvar ping = require('ping');\n\nvar hosts = ['192.168.1.1', 'google.com', 'yahoo.com'];\nhosts.forEach(function(host){\n ping.sys.probe(host, function(isAlive){\n var msg = isAlive ? 'host ' + host + ' is alive' : 'host ' + host + ' is dead';\n console.log(msg);\n });\n});\n```\n\n##Tradition calls with configuration\n\n```js\nvar cfg = {\n timeout: 10,\n // WARNING: -i 2 may not work in other platform like window\n extra: [\"-i 2\"],\n};\n\nhosts.forEach(function(host){\n ping.sys.probe(host, function(isAlive){\n var msg = isAlive ? 'host ' + host + ' is alive' : 'host ' + host + ' is dead';\n console.log(msg);\n }, cfg);\n});\n```\n\n##Promise wrapper\n\n```js\nvar ping = require('ping');\n\nvar hosts = ['192.168.1.1', 'google.com', 'yahoo.com'];\n\nhosts.forEach(function (host) {\n ping.promise.probe(host)\n .then(function (res) {\n console.log(res);\n });\n});\n```\n\n##Promise Wrapper with configable ping options\n\n```js\nhosts.forEach(function (host) {\n // WARNING: -i 2 argument may not work in other platform like window\n ping.promise.probe(host, {\n timeout: 10,\n extra: [\"-i 2\"],\n }).then(function (res) {\n console.log(res);\n });\n});\n```\n\n### Support configuration\n\nBelow is the possible configuration\n\n```js\n/**\n * Cross platform config representation\n * @typedef {Object} PingConfig\n * @property {boolean} numeric - Map IP address to hostname or not\n * @property {number} timeout - Time duration for ping command to exit\n * @property {number} min_reply - Exit after sending number of ECHO_REQUEST\n * @property {string[]} extra - Optional options does not provided\n */\n```\n\n### Output specification\n\n* For callback based implementaiton:\n\n```js\n/**\n * Callback after probing given host\n * @callback probeCallback\n * @param {boolean} isAlive - Whether target is alive or not\n * @param {Object} error - Null if no error occurs\n */\n```\n\n* For promise based implementation\n\n```js\n/**\n * Parsed response\n * @typedef {object} PingResponse\n * @param {string} host - The input IP address or HOST\n * @param {string} numeric_host - Target IP address\n * @param {boolean} alive - True for existed host\n * @param {string} output - Raw stdout from system ping\n * @param {number} time - Time (float) in ms for first successful ping response\n * @param {string} min - Minimum time for collection records\n * @param {string} max - Maximum time for collection records\n * @param {string} avg - Average time for collection records\n * @param {string} stddev - Standard deviation time for collected records\n */\n```\n\n#### Note\n\n* Since `ping` in this module relies on the `ping` from underlying platform,\narguments in `PingConfig.extra` will definitely be varied across different\nplatforms.\n\n* However, `numeric`, `timeout` and `min_reply` have been abstracted. Values for\nthem are expected to be cross platform.\n\n* By setting `numeric`, `timeout` or `min_reply` to false, you can run `ping`\nwithout corresponding arguments.\n\n# Contributing\n\nBefore opening a pull request please make sure your changes follow the\n[contribution guidelines][1].\n\n[1]: https://github.com/danielzzz/node-ping/blob/master/CONTRIBUTING.md"
}

@ -0,0 +1,13 @@
# Amazon S3 Bucket (Localstack) and Verdaccio 4.x
Verdaccio running with [Localstack](https://github.com/localstack/localstack) provides an easy-to-use test/mocking framework for developing cloud applications (AWS S3 in our example).
## Usage
```
docker-compose up --force-recreate --build --always-recreate-deps
```
## Articles
- [How to fake AWS locally with LocalStack](https://dev.to/goodidea/how-to-fake-aws-locally-with-localstack-27me)

@ -0,0 +1,29 @@
storage: /verdaccio/storage
store:
aws-s3-storage:
bucket: localstack.s3.plugin.test
keyPrefix: docker-test-prefix
region: eu-west-2
endpoint: http://localstack-s3:4572
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
logs:
- { type: stdout, format: pretty, level: trace }
listen:
- 0.0.0.0:4873

@ -0,0 +1,58 @@
version: '2.1'
services:
aws-resources:
build: localStack-resources/
environment:
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
- AWS_DEFAULT_REGION=eu-west-2
- AWS_S3_ENDPOINT=http://localstack-s3:4572
depends_on:
localstack-s3:
condition: service_healthy
links:
- localstack-s3
localstack-s3:
image: localstack/localstack:latest
container_name: localstack-s3-1
environment:
- DEBUG=0
- SERVICES=s3
- DEFAULT_REGION=eu-west-2
- DATA_DIR=/tmp/localstack/data
ports:
- '4572:4572'
- '9999:8080'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4572']
interval: 15s
timeout: 10s
retries: 4
volumes:
- localstack-data:/tmp/localstack
verdaccio:
container_name: verdaccio-s3-plugin
build: s3Plugin/
environment:
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
- AWS_DEFAULT_REGION=eu-west-2
- AWS_S3_ENDPOINT=http://localstack-s3:4572
- AWS_S3_PATH_STYLE=true
ports:
- '4874:4873'
volumes:
- './conf:/verdaccio/conf'
depends_on:
localstack-s3:
condition: service_healthy
links:
- localstack-s3
volumes:
verdaccio:
driver: local
aws-resources:
driver: local
localstack-data:
name: localstack-data

@ -0,0 +1,10 @@
FROM python:2.7
ENV AWS_ACCESS_KEY_ID='[something]'
ENV AWS_SECRET_ACCESS_KEY='[something]'
ENV AWS_S3_ENDPOINT='http://localstack-s3:4572'
RUN pip install awscli
COPY entry.sh /entry.sh
RUN chmod +x /entry.sh
ENTRYPOINT ["/entry.sh"]

@ -0,0 +1,3 @@
#!/bin/bash
aws --endpoint-url http://localstack-s3:4572 s3 mb s3://localstack.s3.plugin.test --region eu-west-2

@ -0,0 +1,15 @@
FROM verdaccio/verdaccio:4
USER root
ENV NODE_ENV=production
## perhaps all of this is not fully required
RUN apk --no-cache add openssl ca-certificates wget && \
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
apk add glibc-2.25-r0.apk
RUN npm i && npm install verdaccio-aws-s3-storage
USER verdaccio

@ -0,0 +1,93 @@
# Verdaccio and Apache2
Running `verdaccio` via reverse proxy is a common practice. This configuration provides a quick way to run the application through **apache2** as reverse proxy.
To run the containers, run the following command in this folder, it should start the containers in detach mode.
```bash
docker-compose up -d
```
To recreate the nginx image you can force the build.
```bash
docker-compose up --build -d
Building apacheproxy
Step 1/5 : FROM eboraas/apache
---> 1ba66e3f5580
Step 2/5 : MAINTAINER Juan Picado <juanpicado19@gmail.com>
---> Using cache
---> 4317b29c20ec
Step 3/5 : RUN a2enmod proxy
---> Using cache
---> b9334b33e2f1
Step 4/5 : COPY ./conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
---> Using cache
---> 6d464388db8f
Step 5/5 : COPY ./conf/env.load /etc/apache2/mods-enabled/env.load
---> Using cache
---> 66740b6ffb97
Successfully built 66740b6ffb97
Recreating verdaccio
Recreating apacheverdaccio_apacheproxy_1
```
To force recreate the images.
```bash
docker-compose up --build --force-recreate -d
```
To stop all containers
```bash
docker-compose stop
```
To display container logs
```bash
$> docker-compose logs
Attaching to apacheverdaccio_apacheproxy_1, verdaccio
verdaccio | warn --- config file - /verdaccio/conf/config.yaml
verdaccio | warn --- http address - http://0.0.0.0:4873/ - verdaccio/2.1.7
verdaccio | http <-- 304, user: undefined, req: 'GET /', bytes: 0/0
verdaccio | http <-- 304, user: undefined, req: 'GET /-/static/jquery.min.js', bytes: 0/0
verdaccio | http <-- 304, user: undefined, req: 'GET /-/static/main.css', bytes: 0/0
verdaccio | http <-- 304, user: undefined, req: 'GET /-/static/main.js', bytes: 0/0
verdaccio | http <-- 304, user: undefined, req: 'GET /-/logo', bytes: 0/0
verdaccio | http <-- 304, user: undefined, req: 'GET /-/static/fontello.woff?10872183', bytes: 0/0
verdaccio | http <-- 200, user: undefined, req: 'GET /-/static/favicon.png', bytes: 0/315
```
To access the apache logs
```bash
&> docker exec -it {ID} /bin/bash
root@da8ee3cb484c:~# tail -f /var/log/apache2/verdaccio-access.log
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /xmlhttprequest-ssl HTTP/1.1" 200 2616 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /yeast HTTP/1.1" 200 2706 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /has-cors HTTP/1.1" 200 1347 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /parsejson HTTP/1.1" 200 1234 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /better-assert HTTP/1.1" 200 2462 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /callsite HTTP/1.1" 200 1369 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /dot-access HTTP/1.1" 200 1477 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /skipper-disk HTTP/1.1" 200 3801 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /native-or-bluebird HTTP/1.1" 200 2257 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
172.20.0.1 - - [31/May/2017:21:16:37 +0000] "GET /foreachasync HTTP/1.1" 200 2742 "install sails" "npm/5.0.0 node/v4.6.1 darwin x64"
tail: unrecognized file system type 0x794c7630 for '/var/log/apache2/verdaccio-access.log'. please report this to bug-coreutils@gnu.org. reverting to polling
```
### Display Information
To display the containers running
```bash
&> docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------------
apacheverdaccio_apacheproxy_1 /usr/sbin/apache2ctl -D FO ... Up 443/tcp, 0.0.0.0:80->80/tcp
verdaccio /usr/src/app/bin/verdaccio ... Up 0.0.0.0:4873->4873/tcp
```

@ -0,0 +1,6 @@
FROM eboraas/apache
MAINTAINER Juan Picado <juanpicado19@gmail.com>
# http://pierrecaserta.com/apache-proxy-one-docker-server-many-domains/
RUN a2enmod proxy
COPY ./conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY ./conf/env.load /etc/apache2/mods-enabled/env.load

@ -0,0 +1,17 @@
ServerName localhost:80
ServerAdmin admin@localhost
<VirtualHost *:80>
ServerName localhost
<Proxy *>
Allow from localhost
</Proxy>
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
ProxyPass / http://verdaccio:4873/ nocanon
ProxyPassReverse / http://verdaccio:4873/
CustomLog /var/log/apache2/verdaccio-access.log combined
ErrorLog /var/log/apache2/verdaccio-error.log
</VirtualHost>

@ -0,0 +1,4 @@
LoadModule env_module /usr/lib/apache2/modules/mod_env.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so

@ -0,0 +1,23 @@
version: '2'
services:
verdaccio:
image: verdaccio/verdaccio:latest
container_name: verdaccio
ports:
- '4873:4873'
volumes:
- verdaccio:/verdaccio
apacheproxy:
build: apache_proxy/
links:
- verdaccio
ports:
- '80:80'
volumes_from:
- verdaccio
volumes:
verdaccio:
driver: local

@ -0,0 +1,71 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
# Maximum amount of users allowed to register, defaults to "+inf".
# You can set this to -1 to disable registration.
#max_users: 1000
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@jota/*':
access: $all
publish: $all
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs
'**':
# 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: $all
# if package is not available locally, proxy requests to 'npmjs' registry
proxy: npmjs
# To use `npm audit` uncomment the following section
middlewares:
audit:
enabled: true
# log settings
logs:
- { type: stdout, format: pretty, level: trace }
#- {type: file, path: verdaccio.log, level: info}

@ -0,0 +1 @@
jpicado:$6vkdNgRX2npc:autocreated 2017-07-11T18:48:38.003Z

@ -0,0 +1,13 @@
version: '2.1'
services:
verdaccio:
image: verdaccio/verdaccio:4
container_name: verdaccio-docker-local-storage-vol
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
volumes:
verdaccio:
driver: local

@ -0,0 +1,31 @@
# Verdaccio and simple local storage
This example shows a simple configuration for `verdaccio` plus the default local storage with the minimum configuration required using `docker-compose`.
Contains
- conf: Configuration file and default user httpasswd
- storage: A published default package with 2 versions.
```bash
$> docker-compose up
```
## Login
If you want to login into the Verdaccio instance created via these Docker Examples, please try:
Username: jpicado
Password: jpicado
## Running in Dokku
If you use Dokku, an open-source alternative for Heroku, you can run this example using the following steps:
1. Create a new application `dokku apps:create verdaccio`
2. Pull the verdaccio image `docker pull verdaccio/verdaccio:`
3. Tag the docker image for the app: `docker tag verdaccio/verdaccio:4 dokku/verdaccio:v1`
4. Create the directories for persistent storage `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`, `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`
5. Mount the volumes: `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/storage:/verdaccio/storage` and `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/conf:/verdaccio/conf`
6. Deploy the docker image `dokku tags:deploy verdaccio v1`
7. Enjoy the application

@ -0,0 +1,61 @@
{
"name": "@jota/pk1-juan-1",
"versions": {
"1.0.0": {
"name": "@jota/pk1-juan-1",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"angular": "^1.6.8",
"angular2": "^2.0.0-beta.21",
"babel-core": "^6.26.0",
"babel-env": "^2.4.1",
"jquery": "^3.2.1",
"react": "^16.2.0",
"test_npm_18": "^1.0.1",
"typescript": "^2.6.2",
"verdaccio": "^2.7.2",
"verdaccio-memory": "0.0.3",
"webpack": "^3.10.0"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan-1@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-aKXCuBayXFdSVt4+94B7lqvsPsM0KIsIcXvc7Ghkir3OsE6FQl2bXBBWe6deNuTwJihsFvDbCDiMq+0TIUENBQ==",
"shasum": "faf627d746ce7c670aed088b761960716e68e186",
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan-1/-/@jota/pk1-juan-1-1.0.0.tgz"
}
}
},
"dist-tags": {
"latest": "1.0.0"
},
"time": {
"modified": "2018-01-17T18:32:18.049Z",
"created": "2018-01-17T18:32:18.049Z",
"1.0.0": "2018-01-17T18:32:18.049Z"
},
"_distfiles": {},
"_attachments": {
"pk1-juan-1-1.0.0.tgz": {
"shasum": "faf627d746ce7c670aed088b761960716e68e186",
"version": "1.0.0"
}
},
"_uplinks": {},
"_rev": "3-5cf06458deec6f04",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

@ -0,0 +1,105 @@
{
"name": "@jota/pk1-juan",
"versions": {
"1.0.0": {
"name": "@jota/pk1-juan",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"angular": "^1.6.8",
"angular2": "^2.0.0-beta.21",
"babel-core": "^6.26.0",
"babel-env": "^2.4.1",
"jquery": "^3.2.1",
"react": "^16.2.0",
"test_npm_18": "^1.0.1",
"typescript": "^2.6.2",
"verdaccio": "^2.7.2",
"verdaccio-memory": "0.0.3",
"webpack": "^3.10.0"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-JC4y+iHrUpD+li3Pf9z2oFxw2Mtbqi6vgnIDBB3H/P/t0gAuCKK/LJ86kV7TRyvQwVvyJk1qI61iOVLiMwjZ8Q==",
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.0.tgz"
}
},
"1.0.1": {
"name": "@jota/pk1-juan",
"version": "1.0.1",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"angular": "^1.6.8",
"angular2": "^2.0.0-beta.21",
"babel-core": "^6.26.0",
"babel-env": "^2.4.1",
"jquery": "^3.2.1",
"react": "^16.2.0",
"test_npm_18": "^1.0.1",
"typescript": "^2.6.2",
"verdaccio": "^2.7.2",
"verdaccio-memory": "0.0.3",
"webpack": "^3.10.0"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.1",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-copZNn2mMX8S3W9czxd3GXKj8vKu1v7JrUD9zOtriP8v9AvZOHIt6nW8+1114cumNGukFxjBO+2VlZC793ynTA==",
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.1.tgz"
}
}
},
"dist-tags": {
"latest": "1.0.0",
"beta2": "1.0.1"
},
"time": {
"modified": "2018-01-17T18:49:09.087Z",
"created": "2018-01-17T18:27:39.952Z",
"1.0.0": "2018-01-17T18:27:39.952Z",
"1.0.1": "2018-01-17T18:49:09.087Z"
},
"_distfiles": {},
"_attachments": {
"pk1-juan-1.0.0.tgz": {
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"version": "1.0.0"
},
"pk1-juan-1.0.1.tgz": {
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"version": "1.0.1"
}
},
"_uplinks": {},
"_rev": "18-5118c5019a188840",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

@ -0,0 +1,70 @@
{
"name": "npm_test_pkg1",
"versions": {
"1.0.0": {
"name": "npm_test_pkg1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"_id": "npm_test_pkg1@1.0.0",
"_npmVersion": "5.1.0",
"_nodeVersion": "4.6.1",
"_npmUser": {},
"dist": {
"integrity": "sha512-qq8u/xKpYFCfmANLg5ohY4ZBkzM7NsKjIpYH+eSXji69aceMQvltRXx0O1qo7yAIORiCFsMTGLlkDCQtbhByxg==",
"shasum": "d058de16fdf8bde775ef2898e682faacc3eaa67f",
"tarball": "http://localhost:4873/npm_test_pkg1/-/npm_test_pkg1-1.0.0.tgz"
}
},
"1.0.1": {
"name": "npm_test_pkg1",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"_id": "npm_test_pkg1@1.0.1",
"_npmVersion": "5.1.0",
"_nodeVersion": "4.6.1",
"_npmUser": {},
"dist": {
"integrity": "sha512-0YLdKRIAbZJoLpOFqXZE/JldTnGRKjIX999xV4PMJ+sUO6pWiLO8NbG4wuT5738Re3D5WTRa743y9uPvgrTD0A==",
"shasum": "1f6251ce59e375a6328958202ec07eb7de38dae6",
"tarball": "http://localhost:4873/npm_test_pkg1/-/npm_test_pkg1-1.0.1.tgz"
}
}
},
"dist-tags": {
"latest": "1.0.1"
},
"time": {
"modified": "2017-07-11T18:52:35.061Z",
"created": "2017-07-11T18:49:27.417Z",
"1.0.0": "2017-07-11T18:49:27.417Z",
"1.0.1": "2017-07-11T18:52:35.061Z"
},
"_distfiles": {},
"_attachments": {
"npm_test_pkg1-1.0.0.tgz": {
"shasum": "d058de16fdf8bde775ef2898e682faacc3eaa67f",
"version": "1.0.0"
},
"npm_test_pkg1-1.0.1.tgz": {
"shasum": "1f6251ce59e375a6328958202ec07eb7de38dae6",
"version": "1.0.1"
}
},
"_uplinks": {},
"_rev": "11-382567c9979db3fd",
"readme": "ERROR: No README data found!"
}

@ -0,0 +1,61 @@
{
"name": "pk1-juan",
"versions": {
"1.0.0": {
"name": "pk1-juan",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"angular": "^1.6.8",
"angular2": "^2.0.0-beta.21",
"babel-core": "^6.26.0",
"babel-env": "^2.4.1",
"jquery": "^3.2.1",
"react": "^16.2.0",
"test_npm_18": "^1.0.1",
"typescript": "^2.6.2",
"verdaccio": "^2.7.2",
"verdaccio-memory": "0.0.3",
"webpack": "^3.10.0"
},
"readmeFilename": "README.md",
"_id": "pk1-juan@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-K3ifqa0DEndma1RPhM83TBVISIY3wq2JdTL0GafvJno6z6JvFBp4iQgyrKn7Yjkd0J/LZ9IJvhNWsGQZuoXMPQ==",
"shasum": "5d670df046b9bc4bc1714efe8873a614c522e41d",
"tarball": "http://0.0.0.0:4873/pk1-juan/-/pk1-juan-1.0.0.tgz"
}
}
},
"dist-tags": {
"latest": "1.0.0"
},
"time": {
"modified": "2018-01-17T18:27:09.087Z",
"created": "2018-01-17T18:27:09.087Z",
"1.0.0": "2018-01-17T18:27:09.087Z"
},
"_distfiles": {},
"_attachments": {
"pk1-juan-1.0.0.tgz": {
"shasum": "5d670df046b9bc4bc1714efe8873a614c522e41d",
"version": "1.0.0"
}
},
"_uplinks": {},
"_rev": "5-e7a0e845b8b0cdc8",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

@ -0,0 +1,43 @@
# Verdaccio loading external plugins
This example aims to show how to set up external plugins without the need to create a custom Docker Image.
This example uses the folder `plugins/` as entry point to locate external plugins.
```
plugins: /verdaccio/plugins
```
at the same time we define the plugin we want to load `verdaccio-memory`.
```
store:
memory:
limit: 1000
```
### Prerequisites
- verdaccio `>3.3.0`
### Example
To run the containers, run the following command in this folder, it should start the containers in detach mode.
```bash
$> docker-compose up -d
Recreating verdaccio-3-docker-plugin-external ... done
Attaching to verdaccio-3-docker-plugin-external
verdaccio-3-docker-plugin-external | warn --- config file - /verdaccio/conf/config.yaml
verdaccio-3-docker-plugin-external | warn --- Plugin successfully loaded: memory
verdaccio-3-docker-plugin-external | warn --- Plugin successfully loaded: htpasswd
verdaccio-3-docker-plugin-external | warn --- Plugin successfully loaded: audit
verdaccio-3-docker-plugin-external | warn --- http address - http://0.0.0.0:4873/ - verdaccio/3.2.0
```
To stop all containers
```bash
docker-compose stop
```

@ -0,0 +1,31 @@
plugins: /verdaccio/plugins
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
store:
memory:
limit: 1000
middlewares:
audit:
enabled: true
packages:
'@*/*':
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
logs:
- { type: stdout, format: pretty, level: trace }

@ -0,0 +1,12 @@
version: '2'
services:
verdaccio:
image: verdaccio/verdaccio:latest
container_name: verdaccio-3-docker-plugin-external
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
- './plugins:/verdaccio/plugins'

@ -0,0 +1,5 @@
{
"rules": {
"max-len": 0
}
}

@ -0,0 +1,17 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.LocalMemory = undefined;
let _localMemory = require('./local-memory');
let _localMemory2 = _interopRequireDefault(_localMemory);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports.LocalMemory = _localMemory2.default;
exports.default = _localMemory2.default;

@ -0,0 +1,96 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
let _memoryHandler = require('./memory-handler');
let _memoryHandler2 = _interopRequireDefault(_memoryHandler);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
const DEFAULT_LIMIT = 1000;
class LocalMemory {
constructor(config, options) {
this.config = config;
this.limit = config.limit || DEFAULT_LIMIT;
this.logger = options.logger;
this.data = this._createEmtpyDatabase();
}
getSecret() {
return Promise.resolve(this.data.secret);
}
setSecret(secret) {
return new Promise((resolve, reject) => {
this.data.secret = secret;
resolve(null);
});
}
add(name, cb) {
const list = this.data.list;
if (list.length < this.limit) {
if (list.indexOf(name) === -1) {
list.push(name);
}
cb(null);
} else {
this.logger.info(
{ limit: this.limit },
'Storage memory has reached limit of @{limit} packages'
);
cb(new Error('Storage memory has reached limit of limit packages'));
}
}
search(onPackage, onEnd, validateName) {
// TODO: pending to implement
onEnd();
}
remove(name, cb) {
const list = this.data.list;
const item = list.indexOf(name);
if (item !== -1) {
list.splice(item, 1);
}
cb(null);
}
get(cb) {
cb(null, this.data.list);
}
sync() {
// nothing to do
}
getPackageStorage(packageInfo) {
// eslint-disable-next-line new-cap
return new _memoryHandler2.default(packageInfo, this.data.files, this.logger);
}
_createEmtpyDatabase() {
const list = [];
const files = {};
const emptyDatabase = {
list,
files,
secret: '',
};
return emptyDatabase;
}
}
exports.default = LocalMemory;

@ -0,0 +1,182 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.fileExist = exports.noSuchFile = undefined;
let _httpErrors = require('http-errors');
let _httpErrors2 = _interopRequireDefault(_httpErrors);
let _memoryFs = require('memory-fs');
let _memoryFs2 = _interopRequireDefault(_memoryFs);
let _streams = require('@verdaccio/streams');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
// $FlowFixMe
const noSuchFile = (exports.noSuchFile = 'ENOENT');
const fileExist = (exports.fileExist = 'EEXISTS');
const fSError = function fSError(message, code = 404) {
const err = (0, _httpErrors2.default)(code, message);
// $FlowFixMe
err.code = message;
return err;
};
const noPackageFoundError = function noPackageFoundError(message = 'no such package') {
const err = (0, _httpErrors2.default)(404, message);
// $FlowFixMe
err.code = noSuchFile;
return err;
};
// eslint-disable-next-line new-cap
const fs = new _memoryFs2.default();
class MemoryHandler {
constructor(packageName, data, logger) {
// this is not need it
this.data = data;
this.name = packageName;
this.logger = logger;
}
updatePackage(pkgFileName, updateHandler, onWrite, transformPackage, onEnd) {
let json = this._getStorage(pkgFileName);
try {
json = JSON.parse(json);
} catch (err) {
return onEnd(err);
}
updateHandler(json, (err) => {
if (err) {
return onEnd(err);
}
try {
onWrite(pkgFileName, transformPackage(json), onEnd);
} catch (err) {
return onEnd(fSError('error on parse', 500));
}
});
}
deletePackage(pkgName, callback) {
delete this.data[pkgName];
callback(null);
}
removePackage(callback) {
callback(null);
}
createPackage(name, value, cb) {
this.savePackage(name, value, cb);
}
savePackage(name, value, cb) {
try {
const json = JSON.stringify(value, null, '\t');
this.data[name] = json;
} catch (err) {
cb(fSError(err.message, 500));
}
cb(null);
}
readPackage(name, cb) {
const json = this._getStorage(name);
const isJson = typeof json === 'undefined';
try {
cb(isJson ? noPackageFoundError() : null, JSON.parse(json));
} catch (err) {
cb(noPackageFoundError());
}
}
writeTarball(name) {
const uploadStream = new _streams.UploadTarball();
const temporalName = `/${name}`;
process.nextTick(function () {
fs.exists(temporalName, function (exists) {
if (exists) {
return uploadStream.emit('error', fSError(fileExist));
}
try {
const file = fs.createWriteStream(temporalName);
uploadStream.pipe(file);
uploadStream.done = function () {
const onEnd = function onEnd() {
uploadStream.emit('success');
};
uploadStream.on('end', onEnd);
};
uploadStream.abort = function () {
uploadStream.emit('error', fSError('transmision aborted', 400));
file.end();
};
uploadStream.emit('open');
} catch (err) {
uploadStream.emit('error', err);
}
});
});
return uploadStream;
}
readTarball(name) {
const pathName = `/${name}`;
const readTarballStream = new _streams.ReadTarball();
process.nextTick(function () {
fs.exists(pathName, function (exists) {
if (!exists) {
readTarballStream.emit('error', noPackageFoundError());
} else {
const readStream = fs.createReadStream(pathName);
readTarballStream.emit('content-length', fs.data[name].length);
readTarballStream.emit('open');
readStream.pipe(readTarballStream);
readStream.on('error', (error) => {
readTarballStream.emit('error', error);
});
readTarballStream.abort = function () {
readStream.destroy(fSError('read has been aborted', 400));
};
}
});
});
return readTarballStream;
}
_getStorage(name = '') {
return this.data[name];
}
}
exports.default = MemoryHandler;

@ -0,0 +1 @@
'use strict';

@ -0,0 +1,72 @@
{
"name": "verdaccio-memory",
"version": "1.0.3",
"description": "storage implementation in memory",
"main": "lib/index.js",
"scripts": {
"release": "standard-version -a -s",
"pretest": "npm run lint",
"test": "jest",
"precommit": "lint-staged",
"format": "prettier --single-quote --trailing-comma none --write \"{src,test}/**/*.js\"",
"lint": "npm run flow && eslint .",
"flow": "flow",
"prepublish": "npm run build",
"commitmsg": "commitlint -e $GIT_PARAMS",
"build": "babel src/ --out-dir lib/ --copy-files --ignore ___tests___"
},
"dependencies": {
"@verdaccio/streams": "^1.0.0",
"http-errors": "1.6.3",
"memory-fs": "^0.4.1"
},
"devDependencies": {
"@commitlint/cli": "7.0.0",
"@commitlint/config-conventional": "7.0.1",
"@commitlint/travis-cli": "7.0.0",
"@verdaccio/types": "3.3.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.6",
"babel-jest": "23.4.0",
"babel-plugin-flow-runtime": "0.17.0",
"babel-plugin-transform-async-to-generator": "6.24.1",
"babel-preset-env": "1.7.0",
"babel-preset-flow": "6.23.0",
"cross-env": "5.2.0",
"eslint": "5.1.0",
"eslint-config-google": "0.9.1",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-flowtype": "2.50.0",
"eslint-plugin-jest": "21.17.0",
"eslint-plugin-prettier": "2.6.2",
"flow-bin": "0.76.0",
"flow-runtime": "0.17.0",
"husky": "0.14.3",
"jest": "23.4.1",
"lint-staged": "7.2.0",
"prettier": "1.13.7",
"rmdir-sync": "1.0.1",
"standard-version": "4.3.0"
},
"keywords": [
"verdaccio",
"plugin",
"storage"
],
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.js": [
"npm run format",
"npm run lint",
"git add"
]
},
"author": "Juan Picado <juanpicado19@gmail.com>",
"private": false,
"license": "MIT"
}

@ -0,0 +1,17 @@
# Verdaccio and Gitlab Authentication
The [verdaccio-gitlab](https://github.com/bufferoverflow/verdaccio-gitlab) plugin can be used to authenticate users against gitlab.
## Running with the provided verdaccio-gitlab docker image
If the only extra plugin you require is verdaccio-gitlab, [you can use the image provided by the plugin project](https://hub.docker.com/r/bufferoverflow/verdaccio-gitlab/). It takes care of the whole plugin setup and is based on the [official verdaccio docker image](https://hub.docker.com/r/verdaccio/verdaccio/).
More information about the configuration required can be found in the [verdaccio-gitlab readme](https://github.com/bufferoverflow/verdaccio-gitlab/blob/master/README.md).
https://hub.docker.com/r/bufferoverflow/verdaccio-gitlab/
## Building your own docker image
There's a [sample docker-compose file in the verdaccio-gitlab repo](https://github.com/bufferoverflow/verdaccio-gitlab/blob/master/docker-compose.yml) that shows how to build & start both gitlab and verdaccio with support for the gitlab plugin, but this is generic enough to be used with any other extra plugins.
You can also extend the [official verdaccio-gitlab image Dockerfile](https://github.com/bufferoverflow/verdaccio-gitlab/blob/master/Dockerfile).

@ -0,0 +1,69 @@
# Verdaccio and https-portal Example
Run `verdaccio` under fully automated HTTPS server powered by Nginx, Let's Encrypt was never so easy. Using [https-portal](https://github.com/SteveLTN/https-portal) all is builtin and no need for extra configuration.
## Prerequisites
In order to make it work, this is just a local setup, so you must update your `host` file.
On Mac
```
➜ sudo vi /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 example.com
```
## Usage
To run the containers, run the followingcommands in this folder, it should start the containers in detach mode.
```bash
docker-compose up -d
```
To recreate the nginx image you can force the build.
```bash
docker-compose up --build -d
```
To force recreate the images.
```bash
docker-compose up --build --force-recreate -d
```
To stop all containers
```bash
docker-compose stop
```
From your Javascript project
```bash
npm publish --registry https://example.com
```
## NPM and self-signed certificates
Be aware of disabling strict SSL in `./npmrc`config file as explained [here](https://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm).
```bash
npm config set strict-ssl false
```
## Login
If you want to login into the Verdaccio instance created via these Docker Examples, please try:
Username: jpicado
Password: jpicado

@ -0,0 +1,28 @@
plugins: /verdaccio/plugins
storage: /verdaccio/storage
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
middlewares:
audit:
enabled: true
packages:
'@*/*':
access: $all
publish: $all
proxy: npmjs
'**':
access: $all
publish: $all
proxy: npmjs
logs:
- { type: stdout, format: pretty, level: trace }

@ -0,0 +1 @@
jpicado:$6vkdNgRX2npc:autocreated 2018-09-22T10:24:17.535Z

@ -0,0 +1,22 @@
version: '2'
services:
verdaccio:
image: verdaccio/verdaccio:4
container_name: verdaccio-https
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
https-portal:
image: steveltn/https-portal:1
ports:
- '80:80'
- '443:443'
links:
- verdaccio:verdaccio
environment:
DOMAINS: 'example.com -> http://verdaccio:4873'
STAGE: local
FORCE_RENEW: 'true'

@ -0,0 +1,51 @@
{
"name": "@scope/example",
"versions": {
"1.0.0": {
"name": "@scope/example",
"version": "1.0.0",
"description": "exampled scoped module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"example"
],
"author": {
"name": "Juan Picado"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1"
},
"_id": "@scope/example@1.0.0",
"_npmVersion": "6.3.0",
"_nodeVersion": "10.1.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-UrpRhmCAwyGF2pWWd+fGDN8tFsVcCoLmK/qHaVAamphR+E4ZUjGf6N5GGgneFwbSeZ0FQrDYtUTPKrysxGIihQ==",
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"tarball": "http://example.com/@scope/example/-/@scope/example-1.0.0.tgz"
}
}
},
"time": {
"modified": "2018-09-22T10:27:32.723Z",
"created": "2018-09-22T10:27:32.723Z",
"1.0.0": "2018-09-22T10:27:32.723Z"
},
"dist-tags": {
"latest": "1.0.0"
},
"_uplinks": {},
"_distfiles": {},
"_attachments": {
"example-1.0.0.tgz": {
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"version": "1.0.0"
}
},
"_rev": "7-24f17006c03f69b9",
"readme": "ERROR: No README data found!"
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: verdaccio-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: verdaccio
spec:
containers:
- name: verdaccio
image: verdaccio/verdaccio
imagePullPolicy: Always
ports:
- containerPort: 4873
# vim: set ts=2 expandtab!:

@ -0,0 +1,61 @@
# Kubernetes Example
This example will use the latest `verdaccio` tag. If you want you set a different that, update the `deployment.yaml` file.
⚠️ There is newer Kubernetes example here that is woth to check out https://github.com/verdaccio/docker-examples/tree/master/kubernetes-helm-example
- Install Minikube
https://github.com/kubernetes/minikube
```bash
$> brew cask install minikube
```
- Run it
```bash
$> minikube start
```
- Deploy
```bash
$> kubectl create -f deployment.yaml
deployment "verdaccio-deployment" created
```
- Check whether the deployment was successful
```bash
$> kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
verdaccio-deployment 1 1 1 1 19m
```
- Deploy the service
```bash
$> kubectl create -f service.yaml
```
- Check the service
```bash
kubectl get services
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.0.0.1 <none> 443/TCP 11h
verdaccio 10.0.0.160 <pending> 4873:30061/TCP 20m
```
- Browse the service
```bash
http://192.168.99.100:30061/
```
You can see the dashboard in action
```
http://192.168.99.100:30000/#!/service?namespace=default
```

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: verdaccio
labels:
app: verdaccio
spec:
selector:
app: verdaccio
ports:
- port: 4873
protocol: TCP
nodePort: 30061
type: LoadBalancer

@ -0,0 +1,181 @@
# Kubernetes using Helm
## Prerequisites
- Kubernetes cluster running
- Read Verdaccio Helm [readme](https://github.com/kubernetes/charts/blob/master/stable/verdaccio/README.md).
#### Install Helm
```
brew install kubernetes-helm
```
Initialize `helm`.
```
➜ helm init --service-account default
Creating /Users/user/.helm
Creating /Users/user/.helm/repository
Creating /Users/user/.helm/repository/cache
Creating /Users/user/.helm/repository/local
Creating /Users/user/.helm/plugins
Creating /Users/user/.helm/starters
Creating /Users/user/.helm/cache/archive
Creating /Users/user/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Adding local repo with URL: http://127.0.0.1:8879/charts
$HELM_HOME has been configured at /Users/user/.helm.
Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!
```
Let's update the helm repo
```
➜ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈
```
Let's install verdaccio
```
➜ helm install stable/verdaccio
NAME: joking-porcupine
LAST DEPLOYED: Tue May 1 17:15:22 2018
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
joking-porcupine-verdaccio-594ff959b4-rr4nq 0/1 ContainerCreating 0 0s
==> v1/ConfigMap
NAME DATA AGE
joking-porcupine-verdaccio 1 0s
==> v1/PersistentVolumeClaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
joking-porcupine-verdaccio Bound pvc-78008a6a-4d52-11e8-86f2-080027bd643e 8Gi RWO standard 0s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
joking-porcupine-verdaccio ClusterIP 10.100.245.159 <none> 4873/TCP 0s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
joking-porcupine-verdaccio 1 1 1 0 0s
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace default -l "app=verdaccio,release=vested-lobster" -o jsonpath="{.items[0].metadata.name}")
kubectl port-forward $POD_NAME 8080:4873
echo "Visit http://127.0.0.1:8080 to use your application"
```
![alt verdaccio](media/kubernetes_dashboard.png 'verdaccio app')
Then, follow the notes.
We export the application
```
export POD_NAME=$(kubectl get pods --namespace default -l "app=verdaccio,release=veering-gorilla" -o jsonpath="{.items[0].metadata.name}")
```
and we expose the port
```
➜ kubectl port-forward $POD_NAME 8080:4873
Forwarding from 127.0.0.1:8080 -> 4873
Forwarding from [::1]:8080 -> 4873
```
Verdaccio is up and running.
```
http://127.0.0.1:8080/#/
```
### Publishing a Package
Let's log in.
```
➜ npm adduser --registry http://127.0.0.1:8080
Username: user
Password: ***
Email: (this IS public) user@domain.com
Logged in as user on http://127.0.0.1:8080/.
```
and now we can publish
```
➜ npm publish --registry http://127.0.0.1:8080
+ @kubernetes/hellonode-example@1.0.0
```
![alt verdaccio](media/kubernetes_verdaccio.png 'verdaccio app')
### Scale
Check the pod name (if you do not include --name) on install helm, kubernetes generate a random name.
```
➜ kubectl get pods
NAME READY STATUS RESTARTS AGE
veering-gorilla-verdaccio-666d9488bc-n9p27 1/1 Running 0 11m
```
Let's scale
```
➜ kubectl scale deployment veering-gorilla-verdaccio --replicas=3
deployment.extensions "veering-gorilla-verdaccio" scaled
```
![alt verdaccio](media/kubernetes_scale.png 'verdaccio scaled')
## Problems
I had this issue trying to install verdaccio helm, to solve it I just run a command and all works perfectly.
### [Registered user can't login](https://github.com/verdaccio/verdaccio/issues/943)
If you are facing this issue please read the following link https://github.com/verdaccio/verdaccio/issues/943#issuecomment-427670085
### Connection refused
```
➜ helm install stable/verdaccio
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/configmaps?labelSelector=OWNER%!D(MISSING)TILLER: dial tcp 127.0.0.1:8080: connect: connection refused
```
Run the following script to solve it.
```
kubectl -n kube-system patch deployment tiller-deploy -p '{"spec": {"template": {"spec": {"automountServiceAccountToken": true}}}}'
```
#### Tiller pod is missing
```
➜ helm install stable/verdaccio
Error: could not find a ready tiller pod
```
Run this to fix it.
```
helm init --upgrade
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

@ -0,0 +1,78 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
ldap:
type: ldap
client_options:
url: 'ldap://openldap:389'
# Only required if you need auth to bind
adminDn: 'cn=admin,dc=example,dc=org'
adminPassword: 'admin'
# Search base for users
searchBase: 'ou=People,dc=example,dc=org'
searchFilter: '(cn={{username}})'
# If you are using groups, this is also needed
groupDnProperty: 'cn'
groupSearchBase: 'ou=Groups,dc=example,dc=org'
# If you have memberOf support on your ldap
searchAttributes: ['*', 'memberOf']
# Else, if you don't (use one or the other):
# groupSearchFilter: '(memberUid={{dn}})'
#
# Optional, default false.
# If true, then up to 100 credentials at a time will be cached for 5 minutes.
cache: false
# Optional
reconnect: true
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@scope/*':
# scoped packages
access: marpontes zach leonardo
publish: $authenticated
proxy: npmjs
'@*/*':
# scoped packages
access: $all
publish: $authenticated
proxy: npmjs
'**':
# 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: trace }
#- {type: file, path: verdaccio.log, level: info}
listen:
- 0.0.0.0:4873

@ -0,0 +1,48 @@
version: '2'
services:
verdaccio:
container_name: verdaccio-ldap-1
build: verdaccio-ldap/
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
openldap:
image: osixia/openldap
container_name: openldap
hostname: openldap
environment:
LDAP_ORGANISATION: 'LDAP Verdaccio Auth'
LDAP_SSL_HELPER_PREFIX: 'ldap'
LDAP_TLS_VERIFY_CLIENT: 'never'
LDAP_LOG_LEVEL: 256
LDAP_ADMIN_PASSWORD: 'admin'
ports:
- '389:389'
links:
- verdaccio
openldap-seed:
image: osixia/openldap
volumes:
- ./docker/ldap/ldif_files:/ldif_files
links:
- openldap
entrypoint: sh -c '/ldif_files/addAll.sh'
openldap-admin:
image: osixia/phpldapadmin
container_name: openldap-admin
hostname: openldap-admin
environment:
PHPLDAPADMIN_HTTPS=false:
PHPLDAPADMIN_LDAP_HOSTS: 'openldap'
ports:
- '8080:80'
links:
- 'openldap:openldap'
depends_on:
- openldap
volumes:
verdaccio:
driver: local

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sleep 5
ldapsearch -v -h openldap -x -D "cn=admin,dc=example,dc=org" -w admin -b "dc=example,dc=org" -s sub
ldapadd -v -h openldap -c -D "cn=admin,dc=example,dc=org" -w admin -f /ldif_files/people.ldif

@ -0,0 +1,69 @@
# --- OUs -------------------------------------
dn: ou=Groups,dc=example,dc=org
objectClass: organizationalunit
objectClass: top
ou: Groups
dn: ou=People,dc=example,dc=org
objectClass: organizationalunit
objectClass: top
ou: People
# --- People ----------------------------------
dn: cn=marpontes,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: marpontes
userpassword: pass
givenname: Marcello
sn: Pontes
mail: marcello@oncase.com.br
uid: 1001
dn: cn=zach,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: zach
userpassword: pass
givenname: Zachary
sn: Zeus
mail: zach@oncase.com.br
uid: 1002
dn: cn=leonardo,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: leonardo
userpassword: pass
givenname: Leonardo
sn: Luiz
mail: zach@oncase.com.br
uid: 1003
# --- Groups ----------------------------------
dn: cn=Administrator,ou=Groups,dc=example,dc=org
objectClass: groupofuniquenames
objectClass: top
ou: Groups
cn: Administrator
uniquemember: cn=marpontes, ou=People, dc=example,dc=org
dn: cn=Developers,ou=Groups,dc=example,dc=org
objectClass: groupofuniquenames
objectClass: top
ou: Groups
cn: Administrator
uniquemember: cn=marpontes, ou=People, dc=example,dc=org
uniquemember: cn=zach, ou=People, dc=example,dc=org
uniquemember: cn=leonardo, ou=People, dc=example,dc=org

@ -0,0 +1,86 @@
# Verdaccio and OpenLDAP Server
Running `verdaccio` with the plugin [https://github.com/Alexandre-io/verdaccio-ldap](https://github.com/Alexandre-io/verdaccio-ldap).
## Introduction
This example is based on:
- **OpenLDAP** (ldap://localhost:389)
- **phpLDAP Admin** (http://localhost:8080/)
- **Verdaccio** (http://localhost:4873/)
It provides a published package named `@scope/example` that only authenticated users can access.
```
packages:
'@scope/*':
access: marpontes zach leonardo
publish: $authenticated
proxy: npmjs
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
'**':
access: $all
publish: $authenticated
proxy: npmjs
```
## Usage
To run the containers, run the following command in this folder, it should starts the containers in detach mode.
```bash
➜ docker-compose up --force-recreate --build
Building verdaccio
Step 1/4 : FROM verdaccio/verdaccio:4.2.2
---> 0d58a1eae16d
Step 2/4 : USER root
---> Using cache
---> fb3300bf15cc
Step 3/4 : RUN npm i && npm i verdaccio-ldap
---> Using cache
---> 97701fa53b43
Step 4/4 : USER verdaccio
---> Using cache
---> fd5ddaa03d8f
Successfully built fd5ddaa03d8f
Successfully tagged ldap-verdaccio_verdaccio:latest
Recreating verdaccio-ldap-1 ... done
Recreating openldap ... done
Recreating ldap-verdaccio_openldap-seed_1 ... done
Recreating openldap-admin ... done
Attaching to verdaccio-ldap-1, openldap, ldap-verdaccio_openldap-seed_1, openldap-admin
verdaccio-ldap-1 | warn --- config file - /verdaccio/conf/config.yaml
verdaccio-ldap-1 | warn --- Plugin successfully loaded: verdaccio-ldap
verdaccio-ldap-1 | warn --- http address - http://0.0.0.0:4873/ - verdaccio/4.2.2
openldap | *** CONTAINER_LOG_LEVEL = 3 (info)
openldap | *** Search service in CONTAINER_SERVICE_DIR = /container/service :
openldap | *** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
openldap | *** link /container/service/slapd/startup.sh to /container/run/startup/slapd
openldap | *** link /container/service/slapd/process.sh to /container/run/process/slapd/run
openldap | *** Set environment for startup files
openldap | *** Environment files will be proccessed in this order :
openldap | Caution: previously defined variables will not be overriden.
openldap | /container/environment/99-default/default.yaml
openldap | /container/environment/99-default/default.startup.yaml
```
To stop all containers
```bash
docker-compose stop
```
## Credentials
You can find the complete list of users in the `people.ldif` file. However here a brief list of credentials.
```
marpontes: pass
zach: pass
leonardo: pass
```

@ -0,0 +1,51 @@
{
"name": "@scope/example",
"versions": {
"1.0.0": {
"name": "@scope/example",
"version": "1.0.0",
"description": "exampled scoped module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"example"
],
"author": {
"name": "Juan Picado"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1"
},
"_id": "@scope/example@1.0.0",
"_npmVersion": "6.3.0",
"_nodeVersion": "10.1.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-UrpRhmCAwyGF2pWWd+fGDN8tFsVcCoLmK/qHaVAamphR+E4ZUjGf6N5GGgneFwbSeZ0FQrDYtUTPKrysxGIihQ==",
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"tarball": "http://localhost:4873/@scope/example/-/@scope/example-1.0.0.tgz"
}
}
},
"time": {
"modified": "2018-09-22T17:08:29.339Z",
"created": "2018-09-22T17:08:29.339Z",
"1.0.0": "2018-09-22T17:08:29.339Z"
},
"dist-tags": {
"latest": "1.0.0"
},
"_uplinks": {},
"_distfiles": {},
"_attachments": {
"example-1.0.0.tgz": {
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"version": "1.0.0"
}
},
"_rev": "9-664a1a1732f461c8",
"readme": "ERROR: No README data found!"
}

@ -0,0 +1,4 @@
FROM verdaccio/verdaccio:4.2.2
USER root
RUN npm i && npm i verdaccio-ldap
USER verdaccio

@ -0,0 +1,78 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
ldap:
type: ldap
client_options:
url: 'ldap://openldap:389'
# Only required if you need auth to bind
adminDn: 'cn=admin,dc=example,dc=org'
adminPassword: 'admin'
# Search base for users
searchBase: 'ou=People,dc=example,dc=org'
searchFilter: '(cn={{username}})'
# If you are using groups, this is also needed
groupDnProperty: 'cn'
groupSearchBase: 'ou=Groups,dc=example,dc=org'
# If you have memberOf support on your ldap
searchAttributes: ['*', 'memberOf']
# Else, if you don't (use one or the other):
# groupSearchFilter: '(memberUid={{dn}})'
#
# Optional, default false.
# If true, then up to 100 credentials at a time will be cached for 5 minutes.
cache: false
# Optional
reconnect: true
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@scope/*':
# scoped packages
access: marpontes zach leonardo
publish: $authenticated
proxy: npmjs
'@*/*':
# scoped packages
access: $all
publish: $authenticated
proxy: npmjs
'**':
# 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: trace }
#- {type: file, path: verdaccio.log, level: info}
listen:
- 0.0.0.0:4873

@ -0,0 +1,48 @@
version: '2'
services:
verdaccio:
container_name: verdaccio-ldap-1
build: verdaccio-ldap/
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './conf:/verdaccio/conf'
openldap:
image: osixia/openldap
container_name: openldap
hostname: openldap
environment:
LDAP_ORGANISATION: 'LDAP Verdaccio Auth'
LDAP_SSL_HELPER_PREFIX: 'ldap'
LDAP_TLS_VERIFY_CLIENT: 'never'
LDAP_LOG_LEVEL: 256
LDAP_ADMIN_PASSWORD: 'admin'
ports:
- '389:389'
links:
- verdaccio
openldap-seed:
image: osixia/openldap
volumes:
- ./docker/ldap/ldif_files:/ldif_files
links:
- openldap
entrypoint: sh -c '/ldif_files/addAll.sh'
openldap-admin:
image: osixia/phpldapadmin
container_name: openldap-admin
hostname: openldap-admin
environment:
PHPLDAPADMIN_HTTPS=false:
PHPLDAPADMIN_LDAP_HOSTS: 'openldap'
ports:
- '8080:80'
links:
- 'openldap:openldap'
depends_on:
- openldap
volumes:
verdaccio:
driver: local

@ -0,0 +1,4 @@
#!/usr/bin/env bash
sleep 5
ldapsearch -v -h openldap -x -D "cn=admin,dc=example,dc=org" -w admin -b "dc=example,dc=org" -s sub
ldapadd -v -h openldap -c -D "cn=admin,dc=example,dc=org" -w admin -f /ldif_files/people.ldif

@ -0,0 +1,69 @@
# --- OUs -------------------------------------
dn: ou=Groups,dc=example,dc=org
objectClass: organizationalunit
objectClass: top
ou: Groups
dn: ou=People,dc=example,dc=org
objectClass: organizationalunit
objectClass: top
ou: People
# --- People ----------------------------------
dn: cn=marpontes,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: marpontes
userpassword: pass
givenname: Marcello
sn: Pontes
mail: marcello@oncase.com.br
uid: 1001
dn: cn=zach,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: zach
userpassword: pass
givenname: Zachary
sn: Zeus
mail: zach@oncase.com.br
uid: 1002
dn: cn=leonardo,ou=People,dc=example,dc=org
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
cn: leonardo
userpassword: pass
givenname: Leonardo
sn: Luiz
mail: zach@oncase.com.br
uid: 1003
# --- Groups ----------------------------------
dn: cn=Administrator,ou=Groups,dc=example,dc=org
objectClass: groupofuniquenames
objectClass: top
ou: Groups
cn: Administrator
uniquemember: cn=marpontes, ou=People, dc=example,dc=org
dn: cn=Developers,ou=Groups,dc=example,dc=org
objectClass: groupofuniquenames
objectClass: top
ou: Groups
cn: Administrator
uniquemember: cn=marpontes, ou=People, dc=example,dc=org
uniquemember: cn=zach, ou=People, dc=example,dc=org
uniquemember: cn=leonardo, ou=People, dc=example,dc=org

@ -0,0 +1,79 @@
# Verdaccio and OpenLDAP Server
Running `verdaccio` with the plugin [https://github.com/Alexandre-io/verdaccio-ldap](https://github.com/Alexandre-io/verdaccio-ldap).
## Introduction
This example is based on:
- **OpenLDAP** (ldap://localhost:389)
- **phpLDAP Admin** (http://localhost:8080/)
- **Verdaccio** (http://localhost:4873/)
It provides a published package named `@scope/example` that only authenticated users can access.
```
packages:
'@scope/*':
access: marpontes zach leonardo
publish: $authenticated
proxy: npmjs
'@*/*':
access: $all
publish: $authenticated
proxy: npmjs
'**':
access: $all
publish: $authenticated
proxy: npmjs
```
## Usage
To run the containers, run the following command in this folder, it should starts the containers in detach mode.
```bash
➜ docker-compose up --force-recreate --build
Building verdaccio
Step 1/2 : FROM verdaccio/verdaccio
---> 5375f8604262
Step 2/2 : RUN npm i && npm install verdaccio-ldap
---> Using cache
---> d89640f08005
Successfully built d89640f08005
Successfully tagged ldap-verdaccio_verdaccio:latest
Recreating verdaccio-ldap-1 ... done
Recreating openldap ... done
Recreating ldap-verdaccio_openldap-seed_1 ... done
Recreating openldap-admin ... done
Attaching to verdaccio-ldap-1, openldap, ldap-verdaccio_openldap-seed_1, openldap-admin
verdaccio-ldap-1 | warn --- config file - /verdaccio/conf/config.yaml
openldap | *** CONTAINER_LOG_LEVEL = 3 (info)
verdaccio-ldap-1 | warn --- Plugin successfully loaded: ldap
openldap | *** Search service in CONTAINER_SERVICE_DIR = /container/service :
openldap | *** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
openldap | *** link /container/service/slapd/startup.sh to /container/run/startup/slapd
openldap | *** link /container/service/slapd/process.sh to /container/run/process/slapd/run
openldap | *** Set environment for startup files
openldap | *** Environment files will be proccessed in this order :
openldap | Caution: previously defined variables will not be overriden.
openldap | /container/environment/99-default/default.startup.yaml
openldap | /container/environment/99-default/default.yaml
```
To stop all containers
```bash
docker-compose stop
```
## Credentials
You can find the complete list of users in the `people.ldif` file. However here a brief list of credentials.
```
marpontes: pass
zach: pass
leonardo: pass
```

@ -0,0 +1,51 @@
{
"name": "@scope/example",
"versions": {
"1.0.0": {
"name": "@scope/example",
"version": "1.0.0",
"description": "exampled scoped module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"example"
],
"author": {
"name": "Juan Picado"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.3.1"
},
"_id": "@scope/example@1.0.0",
"_npmVersion": "6.3.0",
"_nodeVersion": "10.1.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-UrpRhmCAwyGF2pWWd+fGDN8tFsVcCoLmK/qHaVAamphR+E4ZUjGf6N5GGgneFwbSeZ0FQrDYtUTPKrysxGIihQ==",
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"tarball": "http://localhost:4873/@scope/example/-/@scope/example-1.0.0.tgz"
}
}
},
"time": {
"modified": "2018-09-22T17:08:29.339Z",
"created": "2018-09-22T17:08:29.339Z",
"1.0.0": "2018-09-22T17:08:29.339Z"
},
"dist-tags": {
"latest": "1.0.0"
},
"_uplinks": {},
"_distfiles": {},
"_attachments": {
"example-1.0.0.tgz": {
"shasum": "4c36e40e65049b32cd49599f65cb50b81b9d8810",
"version": "1.0.0"
}
},
"_rev": "9-664a1a1732f461c8",
"readme": "ERROR: No README data found!"
}

@ -0,0 +1,3 @@
FROM verdaccio/verdaccio:3
RUN npm i && npm install verdaccio-ldap

@ -0,0 +1,41 @@
# Verdaccio Uplinks
## Context
This is an experiment for the **uplinks** feature.
https://verdaccio.org/docs/en/uplinks
Furthermore, this experiment also proves the oldest Verdaccio (2.x) still is able to communicate with the latest development version (4.x).
## Objective
We have 3 registries:
- Server 1 (verdaccio@4.x)
- Server 2 (verdaccio@2.x)
- Server 3 (verdaccio@3.x)
The servers have no authentication in order to simplify the configuration. The server 3 and server 1 are chained with server 2 which is the unique that contains the dependency `@jota/pk1-juan`.
The request will go through `server 1 --> server 3 --> server 2` and should retrieve the tarball to the local project executing the following:
```
npm install @jota/pk1-juan --registry http://localhost:4873
```
The result is a successful installation of the package.
## Usage
To force recreate the images.
```bash
docker-compose up --build --force-recreate -d
```
To stop all containers
```bash
docker-compose stop
```

@ -0,0 +1,41 @@
version: '3'
services:
verdaccio:
image: verdaccio/verdaccio:4
container_name: verdaccio-multi-1
ports:
- '4873:4873'
volumes:
- './server1/storage:/verdaccio/storage'
- './server1/conf:/verdaccio/conf'
links:
- verdaccio3:verdaccio3
depends_on:
- verdaccio3
verdaccio2:
image: verdaccio/verdaccio:2
container_name: verdaccio-multi-2
ports:
- '4874:4873'
volumes:
- './server2/storage:/verdaccio/storage'
- './server2/conf:/verdaccio/conf'
verdaccio3:
image: verdaccio/verdaccio:3
container_name: verdaccio-multi-3
ports:
- '4875:4873'
links:
- verdaccio2:verdaccio2
volumes:
- './server3/storage:/verdaccio/storage'
- './server3/conf:/verdaccio/conf'
depends_on:
- verdaccio2
volumes:
verdaccio:
driver: local
verdaccio2:
driver: local
verdaccio3:
driver: local

@ -0,0 +1,55 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
# a list of other known repositories we can talk to
uplinks:
server3:
url: http://verdaccio3:4873/
max_fails: 100
timeout: 100s
packages:
'@jota/*':
access: $all
publish: $all
proxy: server3
'@*/*':
access: $all
publish: $all
proxy: server3
'**':
access: $all
publish: $all
proxy: server3
middlewares:
audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: trace }

@ -0,0 +1,96 @@
{
"name": "@jota/pk1-juan",
"versions": {
"1.0.0": {
"name": "@jota/pk1-juan",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-JC4y+iHrUpD+li3Pf9z2oFxw2Mtbqi6vgnIDBB3H/P/t0gAuCKK/LJ86kV7TRyvQwVvyJk1qI61iOVLiMwjZ8Q==",
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"tarball": "http://verdaccio3:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.0.tgz"
}
},
"1.0.1": {
"name": "@jota/pk1-juan",
"version": "1.0.1",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.1",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-copZNn2mMX8S3W9czxd3GXKj8vKu1v7JrUD9zOtriP8v9AvZOHIt6nW8+1114cumNGukFxjBO+2VlZC793ynTA==",
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"tarball": "http://verdaccio3:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.1.tgz"
}
}
},
"time": {
"modified": "2018-01-17T18:49:09.087Z",
"created": "2018-01-17T18:27:39.952Z",
"1.0.0": "2018-01-17T18:27:39.952Z",
"1.0.1": "2018-01-17T18:49:09.087Z"
},
"dist-tags": {
"latest": "1.0.0",
"beta2": "1.0.1"
},
"_uplinks": {
"server3": {
"etag": "\"3ad640b1f8542d53fd0806e5e8462af7\"",
"fetched": 1549659258060
}
},
"_distfiles": {
"pk1-juan-1.0.0.tgz": {
"url": "http://verdaccio3:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.0.tgz",
"sha": "95a21c648054c7144a23995a519930255f35b6c2",
"registry": "server3"
},
"pk1-juan-1.0.1.tgz": {
"url": "http://verdaccio3:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.1.tgz",
"sha": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"registry": "server3"
}
},
"_attachments": {
"pk1-juan-1.0.0.tgz": {
"shasum": "95a21c648054c7144a23995a519930255f35b6c2"
}
},
"_rev": "3-0c63867229e7ec25",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,56 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
sign:
expiresIn: 7d
# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@jota/*':
access: $all
publish: $all
'@*/*':
# scoped packages
access: $all
publish: $all
proxy: npmjs
'**':
# 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: $all
# if package is not available locally, proxy requests to 'npmjs' registry
proxy: npmjs
# log settings
logs:
- { type: stdout, format: pretty, level: trace }
#- {type: file, path: verdaccio.log, level: info}

@ -0,0 +1,85 @@
{
"name": "@jota/pk1-juan",
"versions": {
"1.0.0": {
"name": "@jota/pk1-juan",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-JC4y+iHrUpD+li3Pf9z2oFxw2Mtbqi6vgnIDBB3H/P/t0gAuCKK/LJ86kV7TRyvQwVvyJk1qI61iOVLiMwjZ8Q==",
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.0.tgz"
}
},
"1.0.1": {
"name": "@jota/pk1-juan",
"version": "1.0.1",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.1",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-copZNn2mMX8S3W9czxd3GXKj8vKu1v7JrUD9zOtriP8v9AvZOHIt6nW8+1114cumNGukFxjBO+2VlZC793ynTA==",
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.1.tgz"
}
}
},
"dist-tags": {
"latest": "1.0.0",
"beta2": "1.0.1"
},
"time": {
"modified": "2018-01-17T18:49:09.087Z",
"created": "2018-01-17T18:27:39.952Z",
"1.0.0": "2018-01-17T18:27:39.952Z",
"1.0.1": "2018-01-17T18:49:09.087Z"
},
"_distfiles": {},
"_attachments": {
"pk1-juan-1.0.0.tgz": {
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"version": "1.0.0"
},
"pk1-juan-1.0.1.tgz": {
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"version": "1.0.1"
}
},
"_uplinks": {},
"_rev": "20-62a9d1d0a27eb84e",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,53 @@
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#
# path to a directory with all packages
storage: /verdaccio/storage
auth:
htpasswd:
file: /verdaccio/conf/htpasswd
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
# a list of other known repositories we can talk to
uplinks:
server2:
url: http://verdaccio2:4873/
packages:
'@jota/*':
access: $all
publish: $all
proxy: server2
'@*/*':
access: $all
publish: $all
proxy: server2
'**':
access: $all
publish: $all
proxy: server2
middlewares:
audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: trace }

@ -0,0 +1,96 @@
{
"name": "@jota/pk1-juan",
"versions": {
"1.0.0": {
"name": "@jota/pk1-juan",
"version": "1.0.0",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.0",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-JC4y+iHrUpD+li3Pf9z2oFxw2Mtbqi6vgnIDBB3H/P/t0gAuCKK/LJ86kV7TRyvQwVvyJk1qI61iOVLiMwjZ8Q==",
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
"tarball": "http://verdaccio2:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.0.tgz"
}
},
"1.0.1": {
"name": "@jota/pk1-juan",
"version": "1.0.1",
"description": "Simple React Webpack Babel Starter Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": {
"name": "Juan Picado",
"email": "juan@jotadeveloper.com"
},
"license": "ISC",
"dependencies": {
"jquery": "^3.2.1"
},
"readmeFilename": "README.md",
"_id": "@jota/pk1-juan@1.0.1",
"_npmVersion": "5.5.1",
"_nodeVersion": "8.7.0",
"_npmUser": {},
"dist": {
"integrity": "sha512-copZNn2mMX8S3W9czxd3GXKj8vKu1v7JrUD9zOtriP8v9AvZOHIt6nW8+1114cumNGukFxjBO+2VlZC793ynTA==",
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"tarball": "http://verdaccio2:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.1.tgz"
}
}
},
"time": {
"modified": "2018-01-17T18:49:09.087Z",
"created": "2018-01-17T18:27:39.952Z",
"1.0.0": "2018-01-17T18:27:39.952Z",
"1.0.1": "2018-01-17T18:49:09.087Z"
},
"dist-tags": {
"latest": "1.0.0",
"beta2": "1.0.1"
},
"_uplinks": {
"server2": {
"etag": "\"4e442b596e437876e8a8719282df3389\"",
"fetched": 1549659258012
}
},
"_distfiles": {
"pk1-juan-1.0.0.tgz": {
"url": "http://verdaccio2:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.0.tgz",
"sha": "95a21c648054c7144a23995a519930255f35b6c2",
"registry": "server2"
},
"pk1-juan-1.0.1.tgz": {
"url": "http://verdaccio2:4873/@jota%2fpk1-juan/-/pk1-juan-1.0.1.tgz",
"sha": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
"registry": "server2"
}
},
"_attachments": {
"pk1-juan-1.0.0.tgz": {
"shasum": "95a21c648054c7144a23995a519930255f35b6c2"
}
},
"_rev": "4-e9be49402b9052ce",
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
# How to extend an Verdaccio Docker image?
Depends of your version the approach is different, please check each version.

@ -0,0 +1,3 @@
FROM verdaccio/verdaccio:3
RUN npm i && npm install verdaccio-s3-storage

@ -0,0 +1,10 @@
FROM verdaccio/verdaccio
USER root
ENV NODE_ENV=production
RUN npm i && npm install verdaccio-aws-s3-storage
USER verdaccio

Some files were not shown because too many files have changed in this diff Show More