-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathserverless.yml
45 lines (39 loc) · 1.22 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
service: bref-example-laravel
provider:
name: aws
# The AWS region in which to deploy (us-east-1 is the default)
region: us-east-1
environment:
APP_ENV: production
APP_DEBUG: true # set to false when moving to production
APP_KEY: 'base64:/EStlF5sExBpWdQ3eB/h+F2zzKGDc5bvDzwe0KD8ZPg='
package:
# Directories to exclude from deployment
patterns:
- '!node_modules/**'
- '!public/storage'
- '!resources/assets/**'
- '!storage/**'
- '!tests/**'
- '!.env'
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
events:
# We also schedule this function to run the scheduler every 10 minutes
- schedule:
rate: rate(10 minutes)
input: '"schedule:run"'
plugins:
# We need to include the Bref plugin
- ./vendor/bref/bref