docker-secreto
v1.1.1
Published
pull docker secrets into an object
Downloads
8
Readme
docker-secreto
"Secreto" is the word for secret, in Spanish.
This provides a super simple way to pull docker secret
passwords into your code.
Installation
npm i -S docker-secreto
To pull all secrets in
const dockerSecreto = require('docker-secreto')
let values = dockerSecreto()
console.info(values)
Output:
{
secret_name: 'secret value goes here',
another_password: 'password123' // because that's what you should use
}
To pull a specific secret
const dockerSecreto = require('docker-secreto')
let values = dockerSecreto('secret_name', 'Default Value')
console.info(values)
Output if there is a match
'secret value goes here'
If there is no matching secret
const dockerSecreto = require('docker-secreto')
let values = dockerSecreto('secret_name', 'Default Value')
console.info(values)
Output if there is not a match
'Default Value'