-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
42 lines (37 loc) · 895 Bytes
/
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
service: chatgpt-linebot
frameworkVersion: '3'
package:
individually: true
custom:
esbuild:
bundle: true
minify: false
sourcemap: true
exclude: ['aws-sdk']
target: 'node18'
define: { 'require.resolve': undefined }
platform: 'node'
concurrency: 10
watch:
pattern: 'src/**/*.ts' # match only typescript files in src directory
ignore: 'temp/**/*'
useDotenv: true
provider:
name: aws
runtime: nodejs18.x
functions:
app:
handler: src/handler.handler
timeout: 30 # seconds, API Gateway has a timeout of 30 seconds
events:
- http:
method: ANY
path: '/api/webhook'
cors: true
environment:
CHANNEL_SECRET: ${env:CHANNEL_SECRET}
CHANNEL_ACCESS_TOKEN: ${env:CHANNEL_ACCESS_TOKEN}
OPENAI_API_KEY: ${env:OPENAI_API_KEY}
plugins:
- serverless-esbuild
- serverless-offline