{"repo":"dusterio/laravel-aws-worker","free":true,"listed":false,"github":"https://github.com/dusterio/laravel-aws-worker","clone":"git clone https://github.com/dusterio/laravel-aws-worker.git","description":"Run Laravel (or Lumen) tasks and queue listeners inside of AWS Elastic Beanstalk workers","language":"PHP","stars":307,"topics":["laravel","aws","beanstalk","worker"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"laravel-aws-worker Run Laravel tasks and queue listeners inside of AWS Elastic Beanstalk workers We've dropped future support for Lumen, however you can still use v0.1.40 for Lumen. Overview Laravel documentation recommends to use supervisor for queue workers and IX cron for scheduled tasks. However, when deploying your application to AWS Elastic Beanstalk, neither option is available. This package helps you run your Laravel jobs in AWS worker environments. Dependencies PHP = 5.5 Laravel = 5.1 Scheduled tasks - option 1 Option one is to use Kernel.php as the schedule and run Laravel schedule runner every minute. You remember how Laravel documentation advised you to invoke the task scheduler? Right, by running on regular basis, and to do that we had to add an entry to our cron file: AWS doesn't allow you to run IX commands or to add cron tasks directly. Instead, you have to make regular HTTP (POST, to be precise) requests to your worker endpoint. Add cron.yaml to the root folder of your application (this can be a part of your repo or you could add this file right before deploying to EB - the important thing is that this file is present at the time of deployment): From now on, AWS will do POST /worker/schedule to your endpoint every minute - kind of the same effect we achieved when editing a UNIX cron file. The important difference here is that the worker environment still has to run a web process in order to execute scheduled tasks. Behind the scenes it will do something very ","default_branch":null,"files":null,"tree":[],"storefront":"/r/dusterio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dusterio/laravel-aws-worker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}