Merged
Conversation
Changes how the CLI generates and manages Lima VM configs to make
changes like mounted directories be accurately reflected in Lima.
trellis-cli used to generate a config for Lima in
`.trellis/lima/{name}.yml` which was used for the initial creation of
the VM. However, even when providing a config to `limactl create`, Lima
creates a separate config in its managed directory (`$HOME/.lima/{name}/lima.yaml`).
This meant that any subsequent config changes in Trellis might only be
persisted to the CLI's managed config (in `.trellis`), which would do
nothing, instead of Lima's config.
For example, if you added a new site to Trellis (or changed the path to
an existing one), you'd either have to delete the VM entirely and start
over, or manually make the changes to Lima's config.
This PR removes the old CLI managed config entirely and instead updates
Lima's config directly (the one in `$HOME/.lima`). This means one less
file to manage and a single source of truth which will allow proper VM
udpates.
Now if you change any wordpress sites in development, stopping and
restarting the VM will apply the new config changes.
9748204 to
bca23c1
Compare
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.
Fixes #421
Changes how the CLI generates and manages Lima VM configs to make changes like mounted directories be accurately reflected in Lima.
trellis-cli used to generate a config for Lima in
.trellis/lima/{name}.ymlwhich was used for the initial creation of the VM. However, even when providing a config tolimactl create, Lima creates a separate config in its managed directory ($HOME/.lima/{name}/lima.yaml).This meant that any subsequent config changes in Trellis might only be persisted to the CLI's managed config (in
.trellis), which would do nothing, instead of Lima's config.For example, if you added a new site to Trellis (or changed the path to an existing one), you'd either have to delete the VM entirely and start over, or manually make the changes to Lima's config.
This PR removes the old CLI managed config entirely and instead updates Lima's config directly (the one in
$HOME/.lima). This means one less file to manage and a single source of truth which will allow proper VM udpates.Now if you change any wordpress sites in development, stopping and restarting the VM will apply the new config changes.