@stendahls/docker-secrets-or-dotenv

1.1.0 • Public • Published

Docker Secrets or dotenv

Reads values from docker secrets or from dotenv.

If NODE_ENV is production it reads each secret from /run/secrets/SECRET_NAME otherwise falls back to local .env file

Usage

const dockerSecret = require('@stendahls/docker-secrets-or-dotenv');

const SLACK_WEBHOOK_URL = dockerSecret('SLACK_WEBHOOK');

Readme

Keywords

none

Package Sidebar

Install

npm i @stendahls/docker-secrets-or-dotenv

Weekly Downloads

4

Version

1.1.0

License

ISC

Unpacked Size

2.26 kB

Total Files

4

Last publish

Collaborators

  • mujahidrashid
  • stoyan.yankov
  • sgnurf
  • kokarn
  • stendahls.it
  • andy.mcpherson
  • ullmark