Add variables to system_source_config without having them in file
On a client project, we have a second postgresql user dedicated for some tasks. It used to be configured in the
sources file :
source = cnx.vreg.config.system_source_config if not interactive: source = source.copy() if source.get("superuser-login"): source["db-user"] = source["superuser-login"] if source.get("superuser-password"): source["db-password"] = source["superuser-password"]
On a kubernetes deployment we tried to add this with the
CW_DB_SUPERUSER_PASSWORD, but it was not taken into account.
We had to add empty values in the sources file to have thoses parameters taken into account. Workaround in docker looks like this :
RUN echo 'superuser-login=' >> /etc/cubicweb.d/instance/sources RUN echo 'superuser-password=' >> /etc/cubicweb.d/instance/sources
Maybe it would be useful not to have to do this, or is it a feature to "restrict" the scope of the
CW_DB_* magic ?