Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lee5i3/config-secrets
https://github.com/lee5i3/config-secrets
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lee5i3/config-secrets
- Owner: lee5i3
- Created: 2017-05-05T12:36:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T20:00:46.000Z (over 4 years ago)
- Last Synced: 2024-09-21T14:47:41.328Z (about 2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Config Secrets
A plug-in for [config](https://www.npmjs.com/package/config) module to support docker secrets.
### Prerequisites
In order for the secrets to work, you will need a ``` custom-environment-variables ``` file in your config folder, it will use the environment variable names as the secret name.
###### custom-environment-variables.yml
```
default:
service:
port: "PORT"
mq:
host: "MQ_HOST"
```### Installing
```
$ npm install config-secrets
```## Configuration
To change the location where the docker secrets are stored, you can add a ``` SECRETS_PATH ``` environment variable, default location is ``` /run/secrets ```
## Notes
Environment variables takes precedent over docker secrets, so if your application needs different setting over the docker secret, you can add the environment variable to overwrite it.