-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update README.md to include an example for Laravel #23
Conversation
I thought this small addition would be useful for the Laravel users of DDEV. Feel free to discard if not wished. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
@@ -72,7 +72,7 @@ SHELL=/bin/bash | |||
**Laravel scheduler**: A cron to run the Laravel scheduler every minute would be: | |||
|
|||
```yaml | |||
- exec: printf "SHELL=/bin/bash\n* * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1\n" | crontab | |||
- exec: printf "SHELL=/bin/bash\n* * * * * cd /var/www/html && IS_DDEV_PROJECT=true php artisan schedule:run >> /dev/null 2>&1\n" | crontab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is apparently a hook to create a cron. I think it would be better to just show how to create the cron? Or if you like doing this in a (post-start hook?) then explain that. But I think this will then create it every time you ddev start
. It might be more fun to add it to a .ddev/web-build/Dockerfile where it only gets created once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rfay
This is consistent with the other framework examples though, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably all of them need some work; they need to show the whole hooks stanza, and they should probably check to see if the cron is already there. Because you can do a ddev start
when it's already running and enter the cron multiple times.
I think it would be far better for all the examples to add the cron in Dockerfile if possible, post-start hook is really, really messy.
No description provided.