Configuration fixes for Docker and docker-compose#2043
Configuration fixes for Docker and docker-compose#2043sumdog wants to merge 2 commits intoiv-org:masterfrom
Conversation
Maybe we should just ditch the configmap and use environment variables for the helm chart. |
I added f9891db which will check to see if the config file exists and skip overwriting it. This should allow to keep the existing helm chart working for now. |
|
Loading config is already possibly from a YAML file, a single env var containing YAML and multiple env vars to override specific preferences. See invidious/src/invidious/helpers/helpers.cr Lines 124 to 197 in 75e5b49 The logic is:
|
The current docker-compose file indicates the entire configuration for invidious can be placed inside a single environment variable, but I couldn't get configuration changes to take effect. Unless I'm missing something, it seems like the program's entrypoint and crystal configuration loading does support pulling in the entire configuration from an environment variable (maybe it did at one time?)
I've adjusted the docker-compose file to define individual configuration variables and allow for custom usernames and password for the database initialization. I currently use a
sedcommand in startup to adjust the SQL files, which is kinda hackey, and it seems like this might be addressed in #1678.The configmap via Kubernetes seems to correctly support injecting a configuration file, but might break if this PR's startup replaces that configuration file on startup.