You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- increased Laravel version constraint to 11
- dropped support for Laravel 5
- updated Readme
- updated supervisor deploy script to work on Amazon Linux 2023
Copy file name to clipboardExpand all lines: README.md
+20-32Lines changed: 20 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Laravel 5 - 9.x Queue Worker for Elastic Beanstalk
1
+
# Laravel 6 - 11.x Queue Worker for Elastic Beanstalk
2
2
3
3
*Use your Laravel application as a worker to consume queues on AWS Elasticbeanstalk*
4
4
5
-
Laravel provides a [wonderful array](https://laravel.com/docs/5.1/queues) of drivers for consuming queues within your application as well as [some documentation](https://laravel.com/docs/5.1/queues#supervisor-configuration) on how to manage your application with [Supervisord](http://supervisord.org/) when it is acting as a worker.
5
+
Laravel provides a [wonderful array](https://laravel.com/docs/11.x/queues) of drivers for consuming queues within your application as well as [some documentation](https://laravel.com/docs/11.x/queues#supervisor-configuration) on how to manage your application with [Supervisord](http://supervisord.org/) when it is acting as a worker.
6
6
7
7
Unfortunately that's where the documentation ends. There is no guidance on how to manage multiple workers from a devops context which is a huge bummer. But don't worry fam I've got your covered.
8
8
@@ -16,11 +16,11 @@ Unfortunately that's where the documentation ends. There is no guidance on how t
16
16
***Parsing of EB environmental variables to generate supervisor config**
17
17
***Or using a pre-built supervisor config supplied in project**
18
18
19
-
## Amazon Linux 1 deprecation
19
+
## Amazon Linux 1 is deprecated and Amazon Linux 2023 is recommended
20
20
21
-
Amazon Linux 1 (AL1) is going to be unsupported soon, it is advised to migrate to use Amazon Linux 2 (AL2)
21
+
Amazon Linux 1 (AL1) is already retired, even Amazon Linux 2 (AL2) will soon going to be unsupported too, so it's recommended to migrate to use Amazon Linux 2023 (AL2023)
Starts from this release will only support AL2, please use previous releases for use in AL1
23
+
Starts from this release will only support AL2023, please use previous releases for use in AL2, with this release will also drop support for Laravel 5 (PHP 7) since EB only support starting from PHP 8.1
@@ -58,7 +52,7 @@ Copy everything from `src/.ebextensions` into your own `.ebextensions` folder an
58
52
59
53
**Note:** This library only consists of the EB deploy steps -- the provider is only for a convenience -- so if you want to you can modify/consolidate the `.ebextensions` / `.platform` folder if you're not into me overwriting your stuff.
60
54
61
-
Don't forget to add +x permission to the EB Platform Hooks scripts
55
+
Don't forget to add +x permission to the EB Platform Hooks scripts ([no longer required for Amazon Linux platform that released on or after April 29, 2022](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.hooks.html#platforms-linux-extend.hooks.more))
Set the [driver](https://laravel.com/docs/5.1/queues#introduction) in your your EB environmental variables:
83
-
84
-
```bash
85
-
QUEUE_DRIVER = [driver]
86
-
```
87
-
88
-
Since Laravel 5.7 the variable name got changed so will also support the new name:
76
+
Set the [driver](https://laravel.com/docs/11.x/queues#driver-prerequisites) in your your EB environmental variables:
89
77
90
78
```bash
91
79
QUEUE_CONNECTION = [driver]
@@ -98,15 +86,15 @@ All queues are configured using EB environmental variables with the following sy
98
86
**Note**: brackets are placeholders only, do not use them in your actual configuration
99
87
100
88
```bash
101
-
queue[QueueName] = [queueName] # Required. The name of the queue that should be run.
89
+
queue[QueueName] = [driver] # Required. The name of the queue that should be run. Value is driver/connection name
102
90
[QueueName]NumProcs = [value] # Optional. The number of instances supervisor should run for this queue. Defaults to 1
103
91
[QueueName]Tries = [value] # Optional. The number of times the worker should attempt to run in the event an unexpected exit code occurs. Defaults to 5
104
92
[QueueName]Sleep = [value] # Optional. The number of seconds the worker should sleep if no new jobs are in the queue. Defaults to 5
105
93
[QueueName]StartSecs = [value] # Optional. How long a job should run for to be considered successful. Defaults to 1
106
94
[QueueName]Delay = [value] # Optional. Time in seconds a job should be delayed before returning to the ready queue. Defaults to 0
107
95
```
108
96
109
-
Add one `queue[QueueName] = [queueName]` entry in your EB environmental variables for each queue you want to run. The rest of the parameters are optional.
97
+
Add one `queue[QueueName] = [driver]` entry in your EB environmental variables for each queue you want to run. The rest of the parameters are optional.
110
98
111
99
That's it! On your next deploy supervisor will have its configuration updated/generated and start chugging along on your queues.
112
100
@@ -158,11 +146,11 @@ Otherwise `parseConfig.php` looks for a json file generated earlier that contain
0 commit comments