Generate salts every time the container starts, unless they're set via environment variables #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New behavior
This pull request makes the container generate
wp-secrets.php
every time the container is recreated.The secrets are still not persisted, so users will need to log in again each time the container is recreated. The secrets can instead be persisted by setting them in environment variables. If all the appropriate environment variables are set, the secrets will not be re-generated. This behavior is not documented in the README, though it is documented in a comment within the placeholder
wp-secrets.php
file.Previous behavior
Previously, when updating or recreating the container, the
wp-secrets.php
reverts to the original state without secrets defined. This is because the persistent volume is mounted to /var/www/wp-content, but the secrets are in /usr/src/wordpress/wp-secrets.php which is NOT part of the volume.I believe this closes #42, though feedback from @bb on that matter would be appreciated.