Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always update config defaults #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pschoffer
Copy link
Contributor

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 pschoffer requested a review from a team as a code owner August 1, 2023 15:21
@rinatkhaziev
Copy link
Contributor

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 ?

@sjinks sjinks self-assigned this Sep 28, 2023
@sjinks
Copy link
Member

sjinks commented Sep 28, 2023

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
Copy link
Member

sjinks commented Sep 28, 2023

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.

@WPprodigy
Copy link
Contributor

WPprodigy commented Sep 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants