-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
88 lines (78 loc) · 2.25 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
service: misskey-crossposter
useDotenv: true
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs14.x
region: ap-northeast-2
stage: dev
iam:
role:
managedPolicies:
- 'arn:aws:iam::aws:policy/service-role/AWSLambdaRole'
- 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
vpc:
securityGroupIds:
- sg-f610b59c
subnetIds:
- subnet-0c408035072b66f05
- subnet-0e2198b674beac6d5
functions:
handler:
handler: index.handler
environment:
NODE_ENV: ${opt:stage, self:provider.stage}
MISSKEY_INSTANCE: ${env:MISSKEY_INSTANCE}
MISSKEY_API_TOKEN: ${env:MISSKEY_API_TOKEN}
MISSKEY_ADMIN: ${env:MISSKEY_ADMIN}
REDIS_URL: ${env:REDIS_URL}
events:
- http:
path: endpoint
method: post
cors: true
package:
patterns:
- 'base_profiles/**'
- '!.git/**'
- '!node_modules/**'
- 'node_modules/misskey-js/**'
- 'node_modules/twitter-api-v2/**'
- 'node_modules/@aws-sdk/**'
- 'node_modules/got/**'
- 'node_modules/redis/**'
# @aws-sdk dependencies
- 'node_modules/@smithy/**'
- 'node_modules/fast-xml-parser/**'
- 'node_modules/tslib/**'
- 'node_modules/@aws-crypto/**'
- 'node_modules/strnum/**'
# got dependencies
- 'node_modules/@sindresorhus/is/**'
- 'node_modules/@szmarczak/http-timer/**'
- 'node_modules/cacheable-lookup/**'
- 'node_modules/cacheable-request/**'
- 'node_modules/decompress-response/**'
- 'node_modules/form-data-encoder/**'
- 'node_modules/get-stream/**'
- 'node_modules/http2-wrapper/**'
- 'node_modules/lowercase-keys/**'
- 'node_modules/p-cancelable/**'
- 'node_modules/responselike/**'
- 'node_modules/defer-to-connect/**'
- 'node_modules/http-cache-semantics/**'
- 'node_modules/keyv/**'
- 'node_modules/mimic-response/**'
- 'node_modules/normalize-url/**'
- 'node_modules/json-buffer/**'
- 'node_modules/quick-lru/**'
- 'node_modules/resolve-alpn/**'
# redis dependencies
- 'node_modules/@redis/**'
- 'node_modules/cluster-key-slot/**'
- 'node_modules/generic-pool/**'
- 'node_modules/yallist/**'
plugins:
- serverless-dotenv-plugin
- serverless-plugin-typescript
- serverless-offline