New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook system overhaul: Access any service, support other commands, user-defined hooks #1372
Comments
I'm using post-start to kick off a Docker container on the host. It's a headless Chrome container; it's hard to get working within DDEV for now because it expects pages loaded through it to be requested by IP or localhost, and DDEV internal IPs are not stable, but the I run it The hook would just be in
So I'd expect it to become:
|
#1038 is more specific, about specifying target container for hook execution. |
Overall there are so many things that can be done here:
|
This has been discussed in Drupal Slack. I have summarised my thoughts below due to the 10K message limit on Slack. I would like to be able to run custom scripts using (For example)
With regards to the possibility this type of functionality could use existing (or new) hooks; the above examples, I feel, do not fit well within (say) a post-startup hook as I may not always want to be able to run core tests, or may not always be migrating content. Some may also need running multiple times a coding session (Let alone a project sprint). |
Thanks so much @cferthorney - that helps loads. I will try to take a look at docksal's approach and lando's custom tooling as well. But the specific examples really do help. Thanks! |
What @cferthorney said. 😆 |
I think what I would like to see here is a commands directory which is auto pulled into ddev? What this will allow us to do is configure and add commands much like we do with additional services in ddev, so we are sticking to an already defined pattern. Such as |
This is effectively what Docksal do with the exception Docksal only uses Bash at present. I don't know if they have future plans to move to allowing other environments/languages. To my mind this would be perfect for Ddev, but I also realise I am slightly biased having used the docksal version extensively over the last 18 months to 2 years. Also @rfay any script in the commands folder would have access to all the environment variables Ddev provides to/with Docker too. This way I could do something like |
The remaining work here is custom commands. |
Is your feature request related to a problem? Please describe.
There are a number of oversights in our hook system and fixing them up would make a lot of people happy even if it disrupted their workflow a bit:
The text was updated successfully, but these errors were encountered: