-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathserverless.yml
69 lines (58 loc) · 1.31 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
service: sls-strapi
provider:
name: aws
runtime: nodejs12.x
profile: <your-aws-profile>
logRetentionInDays: ${self:custom.vars.logRetentionInDays, 1}
environment:
ADMIN_JWT_SECRET: "Just using dummy"
BUCKET_NAME: !Ref S3StaticBucket
# URL from a free Mongo Atlas cluster.
MONGODB_URI: "mongodb+srv://strapiowner:[email protected]/strapi?retryWrites=true&w=majority"
iamRoleStatements:
- Effect: Allow
Action:
- "s3:*"
Resource:
- !Sub
- "#{BucketArn}/*"
- BucketArn: !GetAtt S3StaticBucket.Arn
- !GetAtt S3StaticBucket.Arn
package:
exclude:
- ./**
include:
- node_modules/**
- "!node_modules/.cache/**"
- api/**
- config/**
- extensions/**
- plugins/**
- package.json
- app.js
functions:
api:
handler: app.handler
memorySize: 1024
timeout: 24
events:
- http:
path: /
method: ANY
cors: true
- http:
path: /{any+}
method: ANY
cors: true
resources:
Resources:
S3StaticBucket:
Type: AWS::S3::Bucket
custom:
apigwBinary:
types:
- "multipart/form-data"
plugins:
- serverless-offline
- serverless-cloudformation-sub-variables
- serverless-apigw-binary