npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

verdaccio-minio

v0.2.5

Published

A verdaccio plugin for storing data in Minio

Downloads

213

Readme

Verdaccio - Minio

GitHub GitHub issues Known Vulnerabilities Coverage Status Build Status npm

A verdaccio plugin for storing data in Minio.

Usage

You can use this plugin by installing it globally:

# Install the package globally
$ yarn global add verdaccio-minio

# Print the directory for your global packages
$ yarn global dir
/usr/local/share/.config/yarn/global

# Create a symbolic link to your package directory in the verdaccio plugin folder
$ ln -s /usr/local/share/.config/yarn/global/node_modules/verdaccio-minio /verdaccio/plugins/verdaccio-minio

Then you'll need to provide a configuration file for the minio storage :

# This points to the plugin folder above
plugins: /verdaccio/plugins

# This is mandatory, otherwise verdaccio won't boot
storage: /verdaccio/storage/data

# Here's the plugin configuration option
store:
  minio:
    # The HTTP port of your minio instance
    port: 9000

    # The endpoint on which verdaccio will access minio (without scheme)
    endPoint: minio.minio.svc.cluster.local

    # The minio access key
    accessKey: this-is-not-so-secret

    # The minio secret key
    secretKey: this-is-not-so-secret

    # Disable SSL if you're accessing minio directly through HTTP
    useSSL: false

    # The region used by your minio instance (optional, default to "us-east-1")
    region: eu-west-1

    # A bucket where verdaccio will store it's database & packages (optional, default to "verdaccio")
    bucket: 'npm'

    # Number of retry when a request to minio fails (optional, default to 10)
    retries: 3

    # Delay between retries (optional, default to 100)
    delay: 50
# The rest of the verdaccio configuration

Once this is done you can start your Verdaccio instance, and check minio to see that the bucket as been created automatically

Docker

A docker image is also available for easy deployments. With docker compose :

version: '3.7'

services:
  verdaccio:
    image: barolab/verdaccio
    ports:
      - 4873:4873
    volumes:
      - ./config.yaml:/verdaccio/conf/config.yaml
      - ./htpasswd:/verdaccio/storage/htpasswd
    depends_on:
      - minio
    environment:
      VERDACCIO_PROTOCOL: http
      VERDACCIO_PORT: 4873

  minio:
    image: minio/minio:RELEASE.2020-02-07T23-28-16Z
    command: server /data
    volumes:
      - minio:/data
    ports:
      - 9000:9000
    environment:
      MINIO_ACCESS_KEY: this-is-not-so-secret
      MINIO_SECRET_KEY: this-is-not-so-secret

volumes: minio:

You'll need to write your config file and your htpasswd for the above to work.

If you'd like to check K8S resources I highly recommend you look at the Minio and Verdaccio Helm charts.

Contributing

It's highly recommended that you install the git hooks in your workstation before committing anything to this repository. You can run yarn hooks to install them. There's some documentation for contributors that you should read first :

You'll need docker & yarn for a better development experience with this module. You can run yarn start to start a minio & verdaccio containers on ports 9000 and 4873. Then using the /example folder you can install dependencies using verdaccio as a proxy.