-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathserverless.yaml
64 lines (53 loc) · 1.34 KB
/
serverless.yaml
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
service: scrapper-imoveis
frameworkVersion: '3'
plugins:
# - '@hewmen/serverless-plugin-typescript'
# - serverless-jetpack
- serverless-offline
package:
individually: true
provider:
name: aws
runtime: nodejs18.x
region: us-east-1 # or whatever your region is
stage: ${opt:stage, 'dev'}
environment:
DATABASE_URL: ${env:DATABASE_URL}
PRIVATE_KEY: ${env:PRIVATE_KEY}
TELEGRAM_BOT_TOKEN: ${env:TELEGRAM_BOT_TOKEN}
TELEGRAM_BOT_CHATID: ${env:TELEGRAM_BOT_CHATID}
memorySize: 128
vpc:
securityGroupIds:
- sg-0261a572de2d0458d
subnetIds:
- subnet-0ce68677dd0405115
functions:
api:
handler: dist/main.handler
timeout: 120 # Tempo maximo de 2 minutos para a execução da função
events:
- http:
path: /
method: ANY
cors: true
- http:
path: /{proxy+}
method: ANY
cors: true
callerFindImoveis:
handler: dist/main.callFindProperties
timeout: 120 # Tempo maximo de 2 minutos para a execução da função
events:
- schedule: cron(50 6 ? * TUE,THU,SAT *)
custom:
serverless-offline:
httpPort: 3000
environments:
dev:
prod:
# custom:
# # Enable warmup on all functions (only for production and staging)
# warmup:
# - production
# - staging