-
Notifications
You must be signed in to change notification settings - Fork 5
/
serverless.yml
81 lines (77 loc) · 2.08 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
70
71
72
73
74
75
76
77
78
79
80
81
service:
name: uprtcl-api
# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
custom:
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
packagerOptions:
scripts:
- npm rebuild grpc --target=12.0.0 --target_arch=x64 --target_platform=linux --target_libc=glibc
domainConf:
dev:
domainName: dev-api.intercreativity.io
prd:
domainName: api.intercreativity.io
test:
domainName: test-api.intercreativity.io
customDomain:
domainName: ${self:custom.domainConf.${self:provider.stage}.domainName}
basePath: ''
certificateName: '*.intercreativity.io'
stage: ${self:provider.stage}
createRoute53Record: true
endpointType: regional
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-pseudo-parameters
- serverless-domain-manager
- serverless-offline
provider:
name: aws
runtime: nodejs12.x
region: ${opt:region, 'us-east-1'}
stage: ${opt:stage, 'dev'}
memorySize: 1024
apiGateway:
minimumCompressionSize: 1024 # Enable gzip compression for responses > 1 KB
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
STAGE: ${self:provider.stage}
REGION: ${self:provider.region}
# PROTOCOL: https
# HOST: api.intercreativity.io
# JWT_SECRET: 8O4mbKCIwGvBU0CPeGQYpPYz8OyAmwZB
# DGRAPH_HOST: 10.52.68.89:9080
PROTOCOL: http
HOST: localhost:3000/dev
JWT_SECRET: 123456
DGRAPH_HOST: localhost:9082
vpc:
securityGroupIds:
- sg-0b429fa32624c3b79
subnetIds:
- subnet-00f462f23a8348e38
- subnet-03fbe81e1efed31bd
- subnet-04108133162d43144
timeout: 30
iamRoleStatements:
- Effect: 'Allow'
Action:
- 'secretsmanager:GetSecretValue'
- 'ssm:GetParameterHistory'
- 'ssm:ListTagsForResource'
- 'ssm:GetParametersByPath'
- 'ssm:GetParameters'
- 'ssm:GetParameter'
Resource: '*'
functions:
uprtclAPI:
handler: src/server.handler
reservedConcurrency: 10
events:
- http: any /
- http: any {proxy+}