2.1.1 • Published 6 years ago

docker-hush-hush v2.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

docker-hush-hush

Node module to retrieve docker secrets

Usage:

const hush = require('docker-hush-hush');

// Get all secrets in '/run/secrets' dir
const secrets = hush.getAllSecrets();
console.log(secrets);

// Get single secret in '/run/secrets' dir
const secretName = 'fieldName';
const secret = hush.getSecret(secretName);
console.log(secret);

// Change default dir (i.e. other than /run/secrets)
hush.setBasePath('./different/path');

// Disable caching. 
// By default values will be accessed via fs once.
// After that they are retrieved from memory.
// Using this ensures they are always accessed via fs.
hush.disableCache();

// Here's a good way to get all secrets into process.env in one step
process.env = { ...process.env, ...hush.getAllSecrets() };
2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago