service: heisenberg-layers
package:
  excludeDevDependencies: true
  individually: true
  exclude:
    - database/**
    - docker/**
    - openapi/**
    - .serverless/**
    - serverless/**
    - src/**
    - tests/**
    - .env
    - .env.example
    - env.yml.example
    - "*.env.yml"
    - .gitlab-ci.yml
    - .gitignore
    - README.md
    - node_modules/**
    - tests/**

plugins:
  - serverless-jetpack

app:  heisenberg-layers

provider:
  name: aws
  runtime: nodejs14.x
  stage: dev
  region: eu-west-1
  deploymentBucket:
    name: heisenberg-serverless-deployments-${self:custom.stage}


custom:
  # General
  stage: "${opt:stage, self:provider.stage}"
  region: ${opt:region, self:provider.region}
  
layers:
  GeneralUtils:
    path: serverless/layers/general-utils
    description: "A layer to include general utility packages and functions"
    name: general-utils-${self:custom.stage}
  Authorize:
    path: serverless/layers/authorize
    description: "A layer to help authorize requests"
    name: authorize-${self:custom.stage}
  AwsServices:
    path: serverless/layers/aws-services
    description: "A layer to include aws related services via the aws-sdk"
    name: aws-services-${self:custom.stage}
  Database:
    path: serverless/layers/database
    description: "A layer that includes Objection.js models for the system as well as a database connection."
    name: database-${self:custom.stage} 
  Email:
    path: serverless/layers/email
    description: "A layer that includes functions for sending emails."
    name: email-${self:custom.stage}  