Skip to content

lagden/docker-secrets

Repository files navigation

docker-secrets

NPM version Build Status Coverage Status

Reads the content of a secrets file.

Install

$ npm i @tadashi/docker-secrets

Usage

import process from 'node:process'
import readSecrets from '@tadashi/docker-secrets'

const {
  PASSWD,
} = process.env

const password = await readSecrets(PASSWD)

API

readSecrets(value: string | URL): Promise

Return the content of the secrets file as a string, or the original value if an error occurs.

Donate ❤️

  • BTC: bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4

License

MIT © Thiago Lagden

About

Helper to read docker secret file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published