watchdog-proxy/serverless.yml

62 строки
2.3 KiB
YAML

service: ${file(serverless.local.yml):service, "watchdog-proxy"}
custom:
localConfig: ${file(serverless.local.yml)}
dynamicConfig: ${file(config/dynamic.js)}
perStageConfig: ${file(config/${self:custom.stage}.yml), file(config/dev.yml)}
region: ${self:provider.region}
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}
apigwBinary:
types:
- 'multipart/form-data'
fnEnv:
NODE_ENV: ${env:NODE_ENV,"production"}
GIT_COMMIT: ${self:custom.dynamicConfig.GIT_COMMIT}
DISABLE_AUTH_CACHE: ${env:DISABLE_AUTH_CACHE, "0"}
ENABLE_DEV_AUTH: ${env:ENABLE_DEV_AUTH,"0"}
UPSTREAM_SERVICE_URL: ${env:UPSTREAM_SERVICE_URL, self:custom.localConfig.upstreamService.url}
UPSTREAM_SERVICE_KEY: ${env:UPSTREAM_SERVICE_KEY, self:custom.localConfig.upstreamService.key}
SERVICE_STAGE: ${self:custom.stage}
SERVICE_PREFIX: ${self:custom.prefix}
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}
METRICS_URL: ${env:METRICS_URL,""}
EMAIL_FROM: ${env:EMAIL_FROM,""}
EMAIL_TO: ${env:EMAIL_TO,""}
EMAIL_EXPIRES: ${env:EMAIL_EXPIRATION,"2592000"}
MOCK_POSITIVE_CHANCE: ${env:MOCK_POSITIVE_CHANCE,"0.1"}
provider:
name: aws
runtime: nodejs8.10
stage: ${env:STAGE, self:custom.localConfig.stage, opt:stage, 'dev'}
region: ${env:AWS_REGION, "us-east-1"}
memorySize: 128
iamRoleStatements: ${self:custom.perStageConfig.provider.iamRoleStatements}
plugins:
- serverless-s3-remover
- serverless-apigw-binary
- serverless-domain-manager
package:
exclude:
- docs/**
- helpers/**
- test/**
- functions/**/*-test.js
resources: ${self:custom.perStageConfig.resources}
functions: ${self:custom.perStageConfig.functions}