Message8521
12 factor applications are a thing in the software as a service/
container deployed
apps space. One of their tenets (see https://12factor.net/) is that
configs can be set
via environment variables.
Given the number of settings in Roundup, it seems like you would exhaust
the environment
space before getting it configured. However for changing a few configs
when developing
keeping the majority of them the same it has some merit.
The attached patch adds support for overriding any config file setting
from the environment.
Basic idea:
ROUNDUP_MAIN_INSTANT_REGISTRATION=no roundup-demo demo
would set instant_registration in the [main] section of the tracker's
config.ini to yes.
Similarly setting: ROUNDUP_WEB_use_tokenless_csrf_protection=True
when starting roundup-server would enable tokenless csrf protection.
It also works for detectors/config.ini and extensions/config.ini with:
ROUNDUP_DETECTORS_statusauditor_chatting_requires_two_users=yes
(replace DETECTORS with EXTENSIONS as needed).
Note the prefix (ROUNDUP_, ROUNDUP_EXTENSIONS_ ...) has to be
capitalized the section name
and variable name can be in any case.
Normal configuration checks are done on the settings. So a boolean
setting set to 'foo' will
raise an exception. However the exception is a little misleading as it
reports the problem
is in the config file, not an environment variable.
The code works and includes basic tests. If it is considered worth
committing to the repo, it needs
docs in upgrading.txt, admin_guide.txt and probably developers.txt. |
|
| Date |
User |
Action |
Args |
| 2026-09-16 02:58:46 | rouilj | set | recipients:
+ rouilj |
| 2026-09-16 02:58:45 | rouilj | set | messageid: <1789527525.95.0.587513784527.issue2551429@roundup-tracker.org> |
| 2026-09-16 02:58:45 | rouilj | link | issue2551429 messages |
| 2026-09-16 02:58:45 | rouilj | create | |
|