-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
57 lines (53 loc) · 2.41 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
service:
name: quotebot-ui
# Add the serverless-webpack plugin
plugins:
- serverless-finch
- serverless-webpack
- serverless-offline
- serverless-domain-manager
provider:
name: aws
stage: ${opt:stage, 'dev'}
runtime: nodejs8.10
functions:
api:
handler: handler.handler
environment:
DYNAMODB_ACCESS_KEY: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_ACCESS_KEY}
DYNAMODB_SECRET: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_SECRET}
DYNAMODB_REGION: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_REGION}
DYNAMODB_AUTHORIZATION_ACCESS_KEY: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_AUTHORIZATION_ACCESS_KEY}
DYNAMODB_AUTHORIZATION_SECRET: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_AUTHORIZATION_SECRET}
DYNAMODB_AUTHORIZATION_REGION: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):DYNAMODB_AUTHORIZATION_REGION}
AUTHORIZATION_TABLE_NAME: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):AUTHORIZATION_TABLE_NAME}
FLICKR_KEY: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):FLICKR_KEY}
FLICKR_USER_ID: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):FLICKR_USER_ID}
FLICKR_PHOTOSET_ID: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):FLICKR_PHOTOSET_ID}
GOOGLE_CLIENT_ID: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):GOOGLE_CLIENT_SECRET}
GOOGLE_REDIRECT_URI: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):GOOGLE_REDIRECT_URI}
FRONT_END_DOMAIN: ${file(./serverless.variables.${self:provider.stage, 'dev'}.yml):FRONT_END_DOMAIN}
events:
- http:
method: ANY
path: /{proxy+}
cors: true
- http:
method: ANY
path: /api/{proxy+}
cors: true
custom:
myRegion: ${opt:region, 'us-east-1'}
client:
bucketName: madisonquotebot.com
distributionFolder: 'dist'
errorDocument: index.html
redirect:
protocol: https
customDomain:
domainName: api.madisonquotebot.com
basePath: ''
stage: ${self:provider.stage}
createRoute53Record: true
certificateName: '*.madisonquotebot.com'