-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
64 lines (57 loc) · 1.79 KB
/
serverless.yml
File metadata and controls
64 lines (57 loc) · 1.79 KB
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
55
56
57
58
59
60
61
62
63
64
service: sah
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
APP_URL: ${construct:website.url}
SESSION_DRIVER: cookie # Change to database if you have set up a database
QUEUE_CONNECTION: sqs
SQS_QUEUE: ${construct:jobs.queueUrl}
SANCTUM_STATEFUL_DOMAINS: ${construct:website.cname}
package:
# Files and directories to exclude from deployment
patterns:
- '!node_modules/**'
- '!public/storage'
- '!resources/js/presets/**'
- '!storage/**'
- '!tests/**'
functions:
# This function runs the Laravel website/API
web:
handler: public/index.php
runtime: php-82-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-82-console
timeout: 720 # in seconds
# Uncomment to also run the scheduler every minute
events:
- schedule:
rate: rate(1 minute)
input: '"schedule:run"'
plugins:
- ./vendor/bref/bref
- serverless-lift
constructs:
jobs:
type: queue
worker:
handler: Bref\LaravelBridge\Queue\QueueHandler
runtime: php-82
timeout: 60 # seconds
constructs:
website:
type: server-side-website
assets:
'/build/*': public/build
'/images/*': public/images
'/favicon.ico': public/favicon.ico
'/robots.txt': public/robots.txt