1.1.1 • Published 6 years ago

docker-secreto v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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'