This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathserverless.yml
67 lines (61 loc) · 1.73 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
service: open-api
frameworkVersion: ">=1.21.0 <2.0.0"
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
environment:
AUTH0_CLIENT_ID: ${file(./src/config/secrets.js):getSecret.AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET: ${file(./src/config/secrets.js):getSecret.AUTH0_CLIENT_SECRET}
AUTH0_NAMESPACE: ${file(./src/config/secrets.js):getSecret.AUTH0_NAMESPACE}
GRAPHQL_ENDPOINT_URL: ${file(./src/config/secrets.js):getSecret.GRAPHQL_ENDPOINT_URL}
JWT_CERT: ${file(./src/config/secrets.js):getSecret.JWT_CERT}
MONGODB_URL: ${file(./src/config/secrets.js):getSecret.MONGODB_URL}
plugins:
- serverless-webpack
- serverless-offline-scheduler
- serverless-offline
- serverless-plugin-notification-ojongerius
- serverless-plugin-aws-alerts
custom:
serverless-offline:
port: 4000
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
notification: # serverless-plugin-notification-ojongerius
webhook:
url: ${env:GITTER_WEBHOOK}
aws-notifications:
- protocol: email
endpoint: ${env:SERVERLESS_EMAIL_NOTIFICATIONS}
alerts:
stages: # Optionally - select which stages to deploy alarms to
- prod
- stage
dashboards: true
topics:
alarm:
topic: ${self:service}-${opt:stage}-alerts-alarm
notifications: ${self:custom.aws-notifications}
alarms:
- functionThrottles
- functionErrors
- functionInvocations
- functionDuration
functions:
graphql:
handler: src/handler.graphqlHandler
events:
- http:
path: graphql
method: post
cors: true
api:
handler: src/handler.apiHandler
events:
- http:
path: api
method: get
cors: true