-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
54 lines (46 loc) · 1.34 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
service: laravel-mail-api
provider:
name: aws
# The AWS region in which to deploy (us-east-1 is the default)
region: us-east-1
# Environment variables
environment:
APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage
QUEUE_CONNECTION: sqs
SQS_QUEUE: ${construct:jobs.queueUrl}
package:
# Files and directories to exclude from deployment
patterns:
- '!node_modules/**'
- '!public/storage'
- '!resources/assets/**'
- '!storage/**'
- '!tests/**'
functions:
# This function runs the Laravel website/API
web:
handler: public/index.php
runtime: php-81-fpm
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
events:
- httpApi: '*'
# This function lets us run artisan commands in Lambda
artisan:
handler: artisan
runtime: php-81-console
timeout: 720 # in seconds
# Uncomment to also run the scheduler every minute
#events:
# - schedule:
# rate: rate(1 minute)
# input: '"schedule:run"'
constructs:
jobs:
type: queue
worker:
handler: Bref\LaravelBridge\Queue\QueueHandler
runtime: php-81
timeout: 60
plugins:
- ./vendor/bref/bref
- serverless-lift