Consider updating documentation to use drush command
Problem/Motivation
Hello all, feel free to close this issue if this request has already been made (I couldn't find an issue where this was discussed).
Using DDEV, I can't get the commands listed on https://ecaguide.org/library to work. I appreciate that there are a few obvious reasons for this.
1. DDEV instances are run inside a docker container, therefore commands need to be run inside the docker container.
2. For everything else you do with a DDEV instance, you typically do not expect to ssh into your instance and run commands unless something goes wrong.
3. Even when you ssh into your instance the commands are wrong because composer doesn't place recipes into the folder the command expects.
As a result I recommend changing the documentation to use a drush command which solves problem #1 above. While doing this we have the opportunity to fix the relative file location that the composer command currently uses.
So like this. The command on https://ecaguide.org/library/simple/count_user_logins/ would change to:
ddev composer require drupal-eca-recipe/eca_lib_0012
ddev drush cr
ddev drush recipe ../recipes/eca_lib_0012
Oh, I should have added that after running the composer command, a cache clear is needed so that drupal can rerun discovery logic. Perhaps in the use case where you run the composer command without using ddev you can get away of this. But with DDEV, running any command spins up the site, so you need to run the cache clear so that module discovery logic can be rerun and any new modules that the recipe is adding can be found. If you don't run this, the recipe will properly run but error out when a required module (that is definitely, physicially present) isn't found.
Steps to reproduce
Run your recommended recipe script and see if it works for you and your dev setup.
Proposed resolution
Update commands