Thanks for the work on providing tt-rss in docker compose containers.
I was wondering, what are your thoughts on providing & maintaining configuration information, separately to the application code?
Typically, with docker containers, the application code & containers should be disposable, with state (the db, etc.) kept outside the container in a datastore or persistent volume.
Currently the application is stored, along with the config, in the ‘app’ persistent volume.
When starting a new container, configuration information for some parameters can be provided through environment variables, and then on first startup, where the defaults are taken from config.php-dist displayed to the user, validated, then saved to config.php
There’s also a bunch of options in the config.php that can’t be configured through the interface, and must be manually edited. Eg. SINGLE_USER_MODE, SIMPLE_UPDATE_MODE, LOCK_DIRECTORY, CACHE_DIR, ENABLE_REGISTRATION, REG_MAX_USERS, etc, etc. A whole lot of config is possible.
One solution some alternative dockers configurations have used are reading environment variables, and using sed, to replace some of these configuration items on startup.
This effectively means there has to be a one to one mapping/mechanism for each configurable item with an environment variable.
It’s manageable, but the use of sed to modify config.php is a bit hacky.
Another option is to put config.php on it’s own docker volume, separate from the app volume, which would persist it and allow the app volume/code to be rebuilt separately. But this doesn’t allow for easy configuration through environment variables, and deployment using configuration/architecture as code.
I think ideally, it’d be great if nearly everything in either config.php, or config.php-dist was configurable through environment variables, then stored in a persistent data store. However, this needs to be designed in to the installation process.
Do you have any plans or thoughts on how you want initializing and persistence of configuration to be stored long term?