1.1.0 • Published 2 years ago

@stendahls/docker-secrets-or-dotenv v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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');