Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

rozenlicht
Copy link

No description provided.

@rozenlicht
Copy link
Author

I thought this small addition would be useful for the Laravel users of DDEV. Feel free to discard if not wished.

Copy link
Member

@rfay rfay left a 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
Copy link
Member

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.

Copy link
Collaborator

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?

Copy link
Member

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.

@tyler36 tyler36 mentioned this pull request Aug 23, 2023
2 tasks
@tyler36
Copy link
Collaborator

tyler36 commented Aug 23, 2023

Thank you for this PR.

I've started a PR that moves to a Dockerfile installation (#32) as discussed above.
The example from this PR has been added into the README updates there; thereby superceding this PR.

Feel free to make suggestion, updates on #32 if you see any places for improvements.

@tyler36 tyler36 closed this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants