Verdaccio — a lightweight private npm registry and proxy: publish private packages, cache and proxy npmjs, and control access with users and scopes. Deployed as a single host-networked Nomad service with a storage volume.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "verdaccio"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Verdaccio container image. Pin a tag in production.
image = "verdaccio/verdaccio:6"
# Host port for the Verdaccio registry / web UI (VERDACCIO_PORT).
port = 4873
# UID Verdaccio runs as (VERDACCIO_USER_UID). The storage volume is chown'd to this at startup.
uid = 10001
# GID for the storage volume (Verdaccio's default group).
gid = 65533
# Named volume for published packages and htpasswd (/verdaccio/storage).
storage_volume = "verdaccio_storage"
# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "verdaccio" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "verdaccio/verdaccio:6" | The Verdaccio container image. Pin a tag in production. |
| port | number | 4873 | Host port for the Verdaccio registry / web UI (VERDACCIO_PORT). |
| uid | number | 10001 | UID Verdaccio runs as (VERDACCIO_USER_UID). The storage volume is chown'd to this at startup. |
| gid | number | 65533 | GID for the storage volume (Verdaccio's default group). |
| storage_volume | string | "verdaccio_storage" | Named volume for published packages and htpasswd (/verdaccio/storage). |
| constraints | list | [] | Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 300
memory = 256
} | The task resources. |
No variables match.
Verdaccio — a lightweight private npm registry and proxy: publish private packages, cache/proxy npmjs, and control access with users and scopes.
Single host-networked Nomad service. A busybox prestart task chowns the storage volume to
Verdaccio's UID (it runs non-root, uid 10001). The image's bundled config.yaml is used as-is
(it proxies npmjs); mount your own to customize.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run verdaccio --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
4873 |
Registry / web UI port (VERDACCIO_PORT). |
uid / gid |
10001 / 65533 |
User Verdaccio runs as; storage volume is chown'd to it. |
storage_volume |
verdaccio_storage |
/verdaccio/storage — packages + htpasswd. |
image |
verdaccio/verdaccio:6 |
Container image. Pin a tag in production. |
resources |
{ cpu = 300, memory = 256 } |
Task resources. |
npm set registry http://<node-ip>:4873/
npm adduser --registry http://<node-ip>:4873/ # first user; then npm publish
The default config lets any logged-in user publish and proxies npmjs. To restrict access, mount
a custom /verdaccio/conf/config.yaml. Pin the job to the node holding the volume with
constraints.