forked from GUI/covid-vaccine-spotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
68 lines (61 loc) · 1.77 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
service: covid-vaccine-finder
frameworkVersion: "2"
useDotenv: true
provider:
name: aws
runtime: nodejs14.x
lambdaHashingVersion: 20201221
region: us-east-2
memorySize: 128
timeout: 300
environment:
DB_ENDPOINT: "${env:DB_ENDPOINT}"
DB_KEY: "${env:DB_KEY}"
GH_TOKEN: "${env:GH_TOKEN}"
CACHE_DIR: /tmp/cache
WALMART_USERNAME: "${env:WALMART_USERNAME}"
WALMART_PASSWORD: "${env:WALMART_PASSWORD}"
SAMS_CLUB_EMAIL: "${env:SAMS_CLUB_EMAIL}"
SAMS_CLUB_PASSWORD: "${env:SAMS_CLUB_PASSWORD}"
DB_USERNAME: "${env:DB_USERNAME}"
DB_PASSWORD: "${env:DB_PASSWORD}"
DB_NAME: "${env:DB_NAME}"
DB_HOST: "${env:DB_HOST}"
PROXY_URL: "${env:PROXY_URL}"
# os: windows # windows is default, linux is available
# prefix: "sample" # prefix of generated resource name
# subscriptionId: A356AC8C-E310-44F4-BF85-C7F29044AF99
# stage: dev
# type: premium # premium azure functions
# plugins:
# - serverless-google-cloudfunctions
# - serverless-offline
# needs more granular excluding in production as only the serverless provider npm
# package should be excluded (and not the whole node_modules directory)
package:
exclude:
# - node_modules/**
- .gitignore
- .git/**
- .env
- _site/**
- site/_data/**
functions:
refreshPharmaca:
handler: index.refreshPharmaca
reservedConcurrency: 1
events:
- schedule: "rate(2 minutes)"
resources:
Resources:
vaccineDB:
Type: AWS::RDS::DBInstance
Properties:
AllocatedStorage: "5"
DBInstanceIdentifier: "vaccine-db"
DBInstanceClass: "db.t3.micro"
Engine: "postgres"
EngineVersion: "12.5"
MasterUsername: "${env:DB_USERNAME}"
MasterUserPassword: "${env:DB_PASSWORD}"
DeletionPolicy: "Retain"