forked from serverless-plus/serverless-v2ex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
56 lines (55 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
org: serverless-v2ex
app: serverless-v2ex
stage: dev
component: nextjs
name: serverless-v2ex
inputs:
src:
dist: ./
hook: npm run build:sls
exclude:
- .env
- '.git/**'
- 'docs/**'
- '.next/cache/**'
- 'node_modules/**'
region: ${env:REGION}
runtime: Nodejs12.16
functionName: ${name}
layers:
- name: ${output:${stage}:${app}:${name}-layer.name}
version: ${output:${stage}:${app}:${name}-layer.version}
functionConf:
timeout: 10
environment:
variables:
NODE_ENV: production
SERVERLESS: true
apigatewayConf:
protocols:
- http
- https
environment: release
enableCORS: true
function:
functionQualifier: $DEFAULT
customDomains:
- domain: ${env:APIGW_CUSTOM_DOMAIN}
certificateId: ${env:APIGW_CUSTOM_DOMAIN_CERTID}
isDefaultMapping: false
pathMappingSet:
- path: /
environment: release
protocols:
- http
- https
staticConf:
cosConf:
bucket: ${env:BUCKET}
cdnConf:
# First deployment, plz set onlyRefresh to false !!!!
# after you deploy CDN once, just set onlyRefresh to true for refresh CDN cache
onlyRefresh: true
domain: ${env:CDN_DOMAIN}
https:
certId: ${env:CDN_DOMAIN_CERTID}