feat(demo): one-command Docker dev/demo environment#25
Merged
Conversation
- docker/setup.sh: wp core install, plugin activate, seed 5 users, set
pretty permalinks, install demo-picker mu-plugin, flush rewrites
- docker/demo-picker.php: registers /demo + /demo/login/{id} rewrite,
renders picker, handles cookie-based click-login via wp_set_auth_cookie
- docker/compose.yml: wpcli sidecar service + APP_PORT 8090 to avoid
collision with other escalated-* demos on 8080
Verified end-to-end against MariaDB:
$ curl -s -L -o /dev/null -w '%{http_code}\n' http://localhost:8090/demo/
200
$ curl -s -X POST -b cookies -c cookies \
-d "_demo_nonce=$nonce" http://localhost:8090/demo/login/1
302 -> http://localhost:8090/wp-admin/
$ curl -s -o /tmp/admin.html -L -b cookies http://localhost:8090/wp-admin/
200 (Dashboard renders, alice logged in)
Closes #26.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Now end-to-end working.
What you get
3-container compose:
wordpress:6.6-php8.3-apache+ MariaDB + Mailpit + awpclisidecar that runs on every up.The plugin is mounted read-only at
wp-content/plugins/escalated-wordpress. The sidecar (docker/setup.sh) installs WP, activates the plugin, seeds 5 users (alice admin + bob/carol editors + frank/grace subscribers), enables pretty permalinks, installs a tiny mu-plugin (docker/demo-picker.php) that exposes/demo/for click-to-login, and flushes rewrite rules.(Note: this demo uses MariaDB, not Postgres — WordPress is a MySQL-family app. All other escalated-* demos run on Postgres.)
Verified
Closes #26.