JSPM

@venuee/docker-secrets

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q29620F
  • License MIT

Converts Docker Secrets mounted into a container to an object.

Package Exports

  • @venuee/docker-secrets

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@venuee/docker-secrets) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Docker Secrets

This NPM module loads Docker secrets from directory created by Docker Swarm into a JS object for use within Node.js applications.

Installation

npm install @venuee/docker-secrets

Usage

const getSecrets = require('@venuee/docker-secrets');

const secrets = getSecrets('/run/secrets')
// or const secrets = getSecrets('/run/secrets/myDir')

console.log(secrets)

{
    secret_1: ...,
    secret_2: ...,
}

const secret_1 = secrets['secret_1'];