Running multiple blueprints #1631
Replies: 2 comments 3 replies
-
Using this for now and it seems to work:
|
Beta Was this translation helpful? Give feedback.
-
@swissspidy so if I understand correctly, you would like to:
...like in multi-stage Docker builds? If so, you should be able to do it with: npx @wp-playground/cli@latest run-blueprint --blueprint=my-blueprint.json --mount-before-install="./my-wp-dir:/wordpress"
npx @wp-playground/cli@latest run-blueprint --blueprint=remote-blueprint.json --mount-before-install="./my-wp-dir:/wordpress" This will use your local directory as the base site without forcefully installing WordPress in VFS and using that. Now, there's an error the first time you run it:
Just re-run the command and it will work. I'm cooking a fix for that error here: #1770 As a side note, I would love to support that natively in the Playground webapp. It should be fairly easy with the upcoming first-class support for stored sites. We could accept multiple Blueprints via the Query API or, alternatively, consider a It related to Merging Blueprints, except merging would run two Blueprints at once and with sequential runs we could run the first Blueprint, wait a month, and run a second one. This seems similar to Docker base images. Perhaps the "multistage build" strategy could become the first official way of "merging Blueprints". It's not quite merging, sure, but perhaps merging was the wrong idea all along. Multistage seems clean, doesn't require any special resolution rules, and conveniently it gives us multistage builds for free. And if it's ever not enough, then we can discuss where it falls short and how to address that. Ha! Thank you @swissspidy! This is why I really like letting some of these architectural problems simmer for a long time. |
Beta Was this translation helpful? Give feedback.
-
For my project it would be useful to be able to run multiple blueprints:
Using mounts I can partially address (1), but I'd also need to run some CLI commands still.
I thought I could do
npx @wp-playground/cli server
to start the server and then donpx @wp-playground/cli run-blueprint
in another tab, but then I get an error because the port is already in use. Plus, I just realized it does same thing just with exiting the process instead of keeping the server running.Then I tried running the command twice with different blueprints:
But of course that spawns two separate ephemeral sites instead of running against the same site.
My next try would be to somehow merge two blueprints (especially the
steps
), but that seems error prone because I don't know the shape of the second blueprint and maybe that could cause issues because of unexpected order of steps or conflicting steps.Beta Was this translation helpful? Give feedback.
All reactions