docker icon indicating copy to clipboard operation
docker copied to clipboard

Add some auto config via hooks examples (e.g. setting arbitrary `config.php` values via `occ config:system:set`

Open joshtrichards opened this issue 1 year ago • 1 comments

It's not necessary to add every possible config scenario as a dedicated environment variable in the image. I think we can expand the docs for #1964 a bit to give people a clearer idea of how they might use hooks for auto configuration.

Should cut down on new environment variable requests (and without resorting to NC_* usage - which is incomplete and undocumented, upstream, at best - though also on the agenda in #2226)

joshtrichards avatar May 30 '24 23:05 joshtrichards

Adding onto this: I'd like immutable elements of config.php to be able to be set via ENV variables too. Specifically instanceid, passwordsalt, secret and data-fingerprint

Before this is done config.php cannot be recreated on container-instance-recreation purely from the containers config and has to rely on config.php existing and being mounted in. If that is not the case it will treat it as a new instance and generate a new config.php from existing ENV variables and new immutable -id, -salt and -fingerprint fields.

As such such a new config.php with differing identifying fields would fail to work with the existing database and dataset.

Ozymandias42 avatar Apr 26 '25 09:04 Ozymandias42