This repository has been archived by the owner on May 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
96 lines (84 loc) · 1.95 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
org: jschuur
app: videos-learnchinese-club
service: videos-learnchinese-club
plugins:
- serverless-webpack
- serverless-dotenv-plugin
- serverless-offline-dotenv
- serverless-offline
- serverless-domain-manager
- serverless-prune-plugin
package:
individually: true
excludeDevDependencies: true
browser: false
custom:
stage: ${opt:stage, self:provider.stage}
# serverless-offline:
# useChildProcesses: true
domains:
prod: api.learnchinese.club
dev: api-dev.learnchinese.club
domain: ${self:custom.domains.${self:custom.stage}}
customDomain:
domainName: ${self:custom.domains.${self:custom.stage}}
basePath: 'v1'
stage: ${self:custom.stage}
certificateName: '*.learnchinese.club'
createRoute53Record: true
prune:
automatic: true
number: 3
provider:
name: aws
runtime: nodejs12.x
functions:
getVideos:
handler: server/api/videos.getVideos
events:
- http:
path: videos
method: get
cors: true
deleteVideo:
handler: server/api/videos.deleteVideo
events:
- http:
path: videos/
method: delete
cors: true
getChannels:
handler: server/api/channels.getChannels
events:
- http:
path: channels
method: get
cors: true
addChannel:
handler: server/api/channels.addChannel
events:
- http:
path: channels
method: post
cors: true
status:
handler: server/api/status.getStatus
events:
- http:
path: status/
method: get
update_videos:
handler: server/schedule.updateVideos
timeout: 30
events:
- schedule: cron(25,55 * * * ? *)
update_videos_longtail:
handler: server/schedule.updateVideosLongTail
timeout: 30
events:
- schedule: cron(10 0 * * ? *)
update_channels:
handler: server/schedule.updateChannels
timeout: 60
events:
- schedule: rate(6 hours)