forked from undp/carbon-registry
-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
83 lines (76 loc) · 2.94 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
service: carbon-registry-services
provider:
name: aws
runtime: nodejs16.x
stage: ${opt:stage, 'dev'}
region: us-east-1
environment:
PROJECT_NAME: ${self:service}
NODE_ENV: ${self:provider.stage}
NODE_PATH: './:/opt/node_modules'
STAGE: ${self:provider.stage}
LEDGER_TYPE: QLDB #QLDB, PGSQL
IS_EMAIL_DISABLED: 'false'
ASYNC_OPERATIONS_TYPE: Queue
LOCATION_SERVICE: FILE
COUNTRY_NAME: 'CountryX'
COUNTRY_CODE: 'NG'
# iam:
# role: arn:aws:iam::909101490035:role/lambda-role
# vpc:
# subnetIds:
# - subnet-05abb4287f3081602
# - subnet-09148cfff6c5e97b1
# securityGroupIds:
# - sg-0bf65b90711ab2043
package:
patterns:
- "!node_modules/**"
- ".env"
- .env.${self:provider.stage}
- "countries.json"
- "regions.csv"
- "src/i18n/**"
plugins:
- serverless-iam-roles-per-function
- serverless-plugin-typescript
- serverless-plugin-optimize
- serverless-offline
- serverless-domain-manager
- serverless-ssm-fetch
# - '@haftahave/serverless-ses-template'
# params:
# local:
# depLayerArn1: arn:aws:lambda:us-west-2:111111111111:layer:layer:1
# depLayerArn2: arn:aws:lambda:us-west-2:111111111111:layer:layer:1
functions:
- ${file(./iaac/v1-api.yml)}
- ${file(./iaac/v1-handlers.yml)}
custom:
customDomain: ${file(./iaac/gateway/dns.yml):customDomain}
optimize:
external: ["swagger-ui-dist"]
serverlessSsmFetch:
USER_JWT_SECRET: /${self:service}/${self:provider.stage}/USER_JWT_SECRET~true
ADMIN_JWT_SECRET: /${self:service}/${self:provider.stage}/ADMIN_JWT_SECRET~true
DB_PASSWORD: /${self:service}/${self:provider.stage}/DB_PASSWORD~true
SMTP_USERNAME: /${self:service}/${self:provider.stage}/SMTP_USERNAME~true
SMTP_PASSWORD: /${self:service}/${self:provider.stage}/SMTP_PASSWORD~true
MAPBOX_PK: /${self:service}/${self:provider.stage}/MAPBOX_PK~true
ITMO_API_KEY: /${self:service}/${self:provider.stage}/ITMO_API_KEY~true
ITMO_EMAIL: /${self:service}/${self:provider.stage}/ITMO_EMAIL~true
ITMO_PASSWORD: /${self:service}/${self:provider.stage}/ITMO_PASSWORD~true
MRV_API_TOKEN: /${self:service}/${self:provider.stage}/MRV_API_TOKEN~true
PERL_LEDGER_PROVIDER_URL: /${self:service}/${self:provider.stage}/PERL_LEDGER_PROVIDER_URL~true
PERL_LEDGER_CONTRACT_ADDRESS: /${self:service}/${self:provider.stage}/PERL_LEDGER_CONTRACT_ADDRESS~true
PERL_LEDGER_WALLET_PRIVATE_KEY: /${self:service}/${self:provider.stage}/PERL_LEDGER_WALLET_PRIVATE_KEY~true
# sesTemplates:
# addStage: true # Specifies whether to add stage to template name (default false)
# configFile: './src/shared/email/email.template.ts' # Config file path (default './ses-email-templates/index.js')
# region: 'us-east-1'
resources:
- ${file(./iaac/gateway/defaults.yml)}
- ${file(./iaac/v1-databases.yml)}
- ${file(./iaac/v1-queues.yml)}
- ${file(./iaac/v1-ledger.yml)}
- ${file(./iaac/v1-buckets.yml)}