Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hardillb/node-red-private-catalogue-builder
node-red-private-catalogue-builder
https://github.com/hardillb/node-red-private-catalogue-builder
node-red npm registry verdaccio
Last synced: about 1 month ago
JSON representation
node-red-private-catalogue-builder
- Host: GitHub
- URL: https://github.com/hardillb/node-red-private-catalogue-builder
- Owner: hardillb
- License: apache-2.0
- Created: 2020-12-25T12:01:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T21:51:04.000Z (about 1 year ago)
- Last Synced: 2024-05-02T06:17:13.486Z (6 months ago)
- Topics: node-red, npm, registry, verdaccio
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-private-catalogue-builder
A minimal web app to host a `catalogue.json` file for a private repository of
Node-RED nodes.Intended to be run in it's own container as part of either
[multi-tenant-node-red]() or [multi-tenant-node-red-k8s]()## Configure
The container takes the following Environment variables:
- PORT - Which port to listen on (defaults to `3000`)
- HOST - Which local IP Address to bind to (defaults to `0.0.0.0`)
- REGISTRY - A host and optional port number to connect to the NPM registry (defaults to `http://registry:4873`)
- KEYWORD - The npm keyword to filter on (defaults to `node-red`)It presents 2 HTTP endpoints
- /update - a POST to this endpoint will trigger a rebuild of the catalogue
- /catalogue.json - a GET request returns the current catalogueThe `/update` endpoint is intended to be used with the verdaccio private registry configured to send notifications
when packages are uploaded/updated. e.g.```
notify:
method: POST
headers: [{'Content-Type': 'application/json'}]
endpoint: http://catalogue/update
content: '{"name": "{{name}}", "versions": "{{versions}}", "dist-tags": "{{dist-tags}}"}'
```## Build
Build and push the container to the private container repository.
```
$ docker build . -t catalogue
$ docker tag catalogue private.example.com/catalogue
$ docker push private.example.com/catalogue
```## Deploy
### Docker-compose
```
catalogue:
image: catalogue
networks:
- internal
environment:
- "REGISTRY=registry:4873"
depends_on:
- registry
expose:
- "3000"
```### Kubernetes
```
- name: catalogue
image: private.example.com/catalogue
ports:
- containerPort: 3000
env:
- name: REGISTRY
value: 'registry:4873'
```