Closed andronocean closed 1 month ago
I have the same issue; have done for a while (I think since this commit).
$ trellis alias
$ <../bedrock/wp-cli.trellis-alias.yml
"@development":
ssh: "example.test"
path: "~/public/example/current/web/wp"
"@production":
ssh: "example@0.0.0.0:1111"
path: "~/public/example/current/web/wp"
"@staging":
ssh: "example@0.0.0.0:2222"
path: "~/public/example/current/web/wp"
$ grep '~/public'
group_vars/all/main.yml
www_root: ~/public
project_root: ~/public
each time i start a project i have to delete ~/
and /example/
to ensure the paths are public/current/web/wp
I don't entirely remember why that PR stopped using project_root
, but I think the variable just didn't exist in that context so it was always defaulting to www_root + '/' + item.key
? I can take a look again
Version
1.11.1
What did you expect to happen?
This is a very minor bug, easy to correct manually. It seems to be happening because of differences between the file structure of a stock Trellis site vs a Kinsta environment, and Trellis's assumptions around the
project_root
variable.What I expected: running
trellis alias
on a project with astaging
environment on Kinsta should create the alias with apath:
parameter like{{ project_root }}
+/current/web/wp
. It should use the custom{{ project_root }}
I set ingroup_vars/staging/main.yml
according to Kinsta's instructions for Bedrock & Trellis.In other words, it should look something like this, for my
project_root: /www/examplecom_123/public
What actually happens?
The generated
wp-cli.trellis-alias.yml
inserts the site domain from thewordpress_sites.yml
into thepath
:Steps to reproduce
What my Trellis environment config looks like (actual sites anonymized):
Note:
trellis deploy
works perfectly with this configuration — it's just thetrellis alias
command that generates the wrong WP CLI config. Manually correcting the path to/www/examplecom_123/public/current/web/wp
fixes it and makeswp @staging somecommand
work perfectly.System info
Log output
No response
Please confirm this isn't a support request.
Yes