vip-container-images icon indicating copy to clipboard operation
vip-container-images copied to clipboard

Always update config defaults

Open pschoffer opened this issue 2 years ago • 4 comments
trafficstars

If we make change to wp-config-defaults that change won't propagate to existing environments. This update makes it so that it is update on each start of environment.

pschoffer avatar Aug 01 '23 15:08 pschoffer

hmm I'm not sure it's safe - what if I (and this is not theoretical - i do that all the time) updated my wp-config-defaults.php ?

rinatkhaziev avatar Aug 01 '23 20:08 rinatkhaziev

I know it is too late to ask :-) but: what if we create wp-config-defaults.local.php where you can put all your overrides and include it from wp-config-defaults.php?

sjinks avatar Sep 28 '23 10:09 sjinks

Or we can use cp -u (copy only newer files). In this case, we will overwrite wp-config-defaults.php only after updates to the image. Still not optimal, but better than nothing.

sjinks avatar Sep 28 '23 11:09 sjinks

Mmm, i think vip-config.php should effectively be the wp-config-defaults.local.php. We (cantina) are the edge case here since we often tinker with all the things. All in all, we shouldn't have anything that customers need to edit in wp-config, as it should be made to instead be configurable in vip-config.php (or elsewhere). If there is a use case for a vip-config-but-for-local-dev-only, then we should provide a file and location for that, somewhere that can also be committed to the customer's repo so that it can be shared amongst their developers.

But one-off edits to a piece of the environment that we need to occasionally update is not something that is feasible to support as it locks us out of making those changes.

I think let's start with this PR, and if there is feedback of a need for a local wp-config override, we can look into options. The -u flag is a good idea, though I'm unsure if it will work quite as expected since the file's modified timestamp may change as images are rebuilt -- even though the file was never changed.

WPprodigy avatar Sep 28 '23 18:09 WPprodigy