-
-
Notifications
You must be signed in to change notification settings - Fork 20.4k
Description
Is your feature request related to a problem? Please describe.
Currently in order to add credentials to the system or turn challenge on/off you must update a file config.js
that is checked into the current repository. It would be nice if you could control some configuration options via environment such that the set of configuration and credentials could be maintained outside the product code.
This would mean fewer forks of the project would have to exist simply for configuration changes; and it would open up more ability to run from a pre-built Docker container.
Describe the solution you'd like
Any or all of these would help toward the desired outcome:
- Ability to specify the location of
config.js
via an environment variable or command-line parameter. This would mean a Docker container or user of the system could mount an external configuration file from another location rather than having to change a file in the product code. - Ability to enable/disable configuration values via environment variable. For example, an environment setting
CONFIG_CHALLENGE=true
might enable challenge without having to change a file. MaybeCONFIG_USER_0=base64encodedusername:password
(likeCONFIG_USER_0=dXNlcm5hbWU6cGFzc3dvcmQ=
to setusername:password
as the credentials) could add a user to the list. AnyCONFIG_USER_NUMBER
format could add a user to the ordinal collection of users.
The idea, again, being that configuration is externalized from the application code so use of a packaged version of the code (like in a Docker image) rather than a fork/update would be possible.
Describe alternatives you've considered
The only real option is to fork/update because the concept of configuration is very much currently hardcoded to a config.js
file.
Additional context
I was searching for a way to run this off my Synology NAS using Docker and realized I was going to have to do the same thing a lot of other people are presumably doing: fork, update, create a custom container... it seemed like the app could pretty easily be published as an npm package or in a common Docker container if configuration could be externalized. It'd make Interstellar easier to consume.