+
Skip to content

[Feature] Environment-based configuration values and/or location #1116

@tillig

Description

@tillig

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. Maybe CONFIG_USER_0=base64encodedusername:password (like CONFIG_USER_0=dXNlcm5hbWU6cGFzc3dvcmQ= to set username:password as the credentials) could add a user to the list. Any CONFIG_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.

Metadata

Metadata

Assignees

Labels

Feature RequestTell us about a feature you would like added.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载