This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathserverless.yml
66 lines (60 loc) · 2.35 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
service: dev-analytics-affiliation-service
frameworkVersion: '>=1.28.0 <2.0.0'
plugins:
- serverless-domain-manager
provider:
name: aws
runtime: go1.x
stage: ${opt:stage, 'dev'} # dev, test, staging, or prod
region: ${opt:region, 'us-west-2'}
timeout: 60 # optional, in seconds, default is 6
environment:
CORS_ALLOWED_ORIGINS: https://insights.test.platform.linuxfoundation.org,https://lfanalytics.io
LOG_LEVEL: info
N_CPUS: ''
USE_SEARCH_IN_MERGE: ''
ELASTIC_URL: ${ssm:/da_elastic_endpoint~true}
ELASTIC_USERNAME: ${ssm:/da_elastic_username~true}
ELASTIC_PASSWORD: ${ssm:/da_elastic_password~true}
API_DB_ENDPOINT: host=${ssm:/da_api_db_endpoint~true} user=${ssm:/da_api_db_username~true} password=${ssm:/da_api_db_password~true} dbname=${self:custom.apiDB.${self:provider.stage}} sslmode=require
SH_DB_ENDPOINT: ${ssm:/da_sh_db_username~true}:${ssm:/da_sh_db_password~true}@tcp(${ssm:/da_sh_db_endpoint~true}:${ssm:/da_sh_db_port~true})/${self:custom.shDB.${self:provider.stage}}?charset=utf8
SH_DB_RO_ENDPOINT: ${ssm:/da_sh_db_ro_username~true}:${ssm:/da_sh_db_ro_password~true}@tcp(${ssm:/da_sh_db_ro_endpoint~true}:${ssm:/da_sh_db_port~true})/${self:custom.shRODB.${self:provider.stage}}?charset=utf8
AUTH0_DOMAIN: ${ssm:/da_auth0_domain~true}
AUTH0_CLIENT_ID: ${ssm:/da_auth0_client_id~true}
AUTH0_USERNAME_CLAIM: ${ssm:/da_auth0_username_claim~true}
custom:
version: v1
project: dev-analytics-affiliation
apiDB:
prod: dev_analytics
test: dev_analytics_test
shDB:
prod: sortinghat
test: sortinghat
legacyApiEndpoint:
test: https://api.insights.test.platform.linuxfoundation.org
prod: https://api.lfanalytics.io
other: https://api.insights.test.platform.linuxfoundation.org
DAdomain:
test: insights.test.platform.linuxfoundation.org
prod: lfanalytics.io
other: insights.test.platform.linuxfoundation.org
customDomain:
domainName: affiliation.${self:custom.DAdomain.${self:provider.stage}, self:custom.DAdomain.other}
basePath: ""
stage: ${self:provider.stage}
createRoute53Record: false
package:
exclude:
- ./**
include:
- ./bin/**
functions:
metrics:
name: dev-analytics-affiliation-service-handler
handler: bin/dev-analyics-affiliation
events:
- http:
path: /{proxy+}
method: any
cors: true