2018-07-26 23:34:42 +03:00
|
|
|
service: ${file(serverless.local.yml):service, "watchdog-proxy"}
|
2018-05-04 23:01:45 +03:00
|
|
|
|
|
|
|
custom:
|
2018-05-11 22:43:36 +03:00
|
|
|
localConfig: ${file(serverless.local.yml)}
|
2018-07-26 23:34:42 +03:00
|
|
|
dynamicConfig: ${file(config/dynamic.js)}
|
|
|
|
perStageConfig: ${file(config/${self:custom.stage}.yml), file(config/dev.yml)}
|
2018-05-04 23:01:45 +03:00
|
|
|
region: ${self:provider.region}
|
2018-07-26 23:34:42 +03:00
|
|
|
stage: ${env:STAGE, self:custom.localConfig.stage, opt:stage, 'dev'}
|
|
|
|
prefixAuto: ${self:service}-${self:custom.stage}
|
|
|
|
prefix: ${env:PREFIX, self:custom.prefixAuto}
|
|
|
|
resourceNames: ${self:custom.perStageConfig.custom.resourceNames}
|
|
|
|
customDomain: ${file(serverless.local.yml):customDomain, self:custom.perStageConfig.custom.customDomain}
|
|
|
|
remover: ${self:custom.perStageConfig.custom.remover}
|
2018-05-21 23:48:50 +03:00
|
|
|
|
2018-05-09 21:27:08 +03:00
|
|
|
apigwBinary:
|
|
|
|
types:
|
|
|
|
- 'multipart/form-data'
|
2018-07-26 23:34:42 +03:00
|
|
|
|
2018-05-04 23:01:45 +03:00
|
|
|
fnEnv:
|
|
|
|
NODE_ENV: ${env:NODE_ENV,"production"}
|
2018-05-15 23:50:39 +03:00
|
|
|
GIT_COMMIT: ${self:custom.dynamicConfig.GIT_COMMIT}
|
2018-05-11 22:43:36 +03:00
|
|
|
DISABLE_AUTH_CACHE: ${env:DISABLE_AUTH_CACHE, "0"}
|
2018-05-04 23:01:45 +03:00
|
|
|
ENABLE_DEV_AUTH: ${env:ENABLE_DEV_AUTH,"0"}
|
2018-05-11 22:43:36 +03:00
|
|
|
UPSTREAM_SERVICE_URL: ${env:UPSTREAM_SERVICE_URL, self:custom.localConfig.upstreamService.url}
|
|
|
|
UPSTREAM_SERVICE_KEY: ${env:UPSTREAM_SERVICE_KEY, self:custom.localConfig.upstreamService.key}
|
2018-05-04 23:01:45 +03:00
|
|
|
SERVICE_STAGE: ${self:custom.stage}
|
|
|
|
SERVICE_PREFIX: ${self:custom.prefix}
|
2018-07-26 23:34:42 +03:00
|
|
|
HITRATE_TABLE: ${self:custom.resourceNames.hitrate}
|
|
|
|
CREDENTIALS_TABLE: ${self:custom.resourceNames.credentials}
|
|
|
|
QUEUE_NAME: ${self:custom.resourceNames.sqs}
|
|
|
|
CONTENT_BUCKET: ${self:custom.resourceNames.contentBucket}
|
|
|
|
PROCESS_QUEUE_FUNCTION: ${self:custom.resourceNames.process}
|
2018-06-28 22:44:11 +03:00
|
|
|
METRICS_URL: ${env:METRICS_URL,""}
|
2018-07-26 23:34:42 +03:00
|
|
|
EMAIL_FROM: ${env:EMAIL_FROM,""}
|
2018-08-01 00:13:21 +03:00
|
|
|
EMAIL_TO: ${env:EMAIL_TO,""}
|
|
|
|
EMAIL_EXPIRES: ${env:EMAIL_EXPIRATION,"2592000"}
|
|
|
|
MOCK_POSITIVE_CHANCE: ${env:MOCK_POSITIVE_CHANCE,"0.1"}
|
2018-05-04 23:01:45 +03:00
|
|
|
|
|
|
|
provider:
|
|
|
|
name: aws
|
|
|
|
runtime: nodejs8.10
|
2018-05-21 23:48:50 +03:00
|
|
|
stage: ${env:STAGE, self:custom.localConfig.stage, opt:stage, 'dev'}
|
2018-07-26 23:34:42 +03:00
|
|
|
region: ${env:AWS_REGION, "us-east-1"}
|
2018-05-04 23:01:45 +03:00
|
|
|
memorySize: 128
|
2018-07-26 23:34:42 +03:00
|
|
|
iamRoleStatements: ${self:custom.perStageConfig.provider.iamRoleStatements}
|
2018-07-10 23:46:32 +03:00
|
|
|
|
2018-07-26 23:34:42 +03:00
|
|
|
plugins:
|
|
|
|
- serverless-s3-remover
|
|
|
|
- serverless-apigw-binary
|
|
|
|
- serverless-domain-manager
|
2018-05-04 23:01:45 +03:00
|
|
|
|
|
|
|
package:
|
|
|
|
exclude:
|
|
|
|
- docs/**
|
|
|
|
- helpers/**
|
|
|
|
- test/**
|
2018-05-09 21:27:08 +03:00
|
|
|
- functions/**/*-test.js
|
2018-05-04 23:01:45 +03:00
|
|
|
|
2018-07-26 23:34:42 +03:00
|
|
|
resources: ${self:custom.perStageConfig.resources}
|
2018-05-31 03:35:51 +03:00
|
|
|
|
2018-07-26 23:34:42 +03:00
|
|
|
functions: ${self:custom.perStageConfig.functions}
|