-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add Docker support for local mu plugins #9044
Add Docker support for local mu plugins #9044
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.26 MB ℹ️ View Unchanged
|
@marcinbot I would appreciate your 👍 on if it is OK to introduce this. Maybe there are some risks I am not seeing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 don't think there are any risks since this only affects the local env.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! And works as expected.
A few updates to the PR instructions:
Checkout the PR's branch and check that you have a docker/mu-plugins directory with just a .gitkeep file in it
This was actually true only after running npm run up
, which is the second step.
require_once DIR . '/local-hacks/my-precious.php';
This should be require_once __DIR__ . '/local-helpers/my-precious.php';
Co-authored-by: Ahmed <ahmed.el.azzabi@automattic.com>
Thank you, Ahmed!
I messed up the commits. It is fixed now. The directory should be there without having to run
Good catch. I've updated the testing instructions. |
Changes proposed in this Pull Request
We introduce a
docker/mu-plugins
directory that is mounted as thewp-content/mu-plugins
directory in your local client Docker container.This directory is a good place to stash your local development helper files to be loaded when/if needed, without versioning them since the directory is .gitignored. The documentation added provides more details and a recommended starting point.
Testing instructions
docker/mu-plugins
directory with just a.gitkeep
file in itnpm run up
docker/mu-plugins/local-helpers
docker/mu-plugins/local-helpers/my-precious.php
and put in the following contents:docker/mu-plugins/0-local-helpers.php
and put in the following contents:0-local-helpers.php
plugin and ... something else :)docker/mu-plugins/0-local-helpers.php
and if you refresh the WP admin Plugins > Installed plugins > Must-Use page you should still see the0-local-helpers.php
plugin in the list, but no Gollum gif.npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge