forked from smartshare-labs/django-serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
57 lines (52 loc) · 1.56 KB
/
serverless.yml
File metadata and controls
57 lines (52 loc) · 1.56 KB
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
service: threads-app
variablesResolutionMode: 20210326
custom:
relativePathToCommon: "./common"
env: ${file(${self:custom.relativePathToCommon}/env.yml)}
prefixes: ${file(${self:custom.relativePathToCommon}/prefixes.yml)}
pythonRequirements:
usePipenv: false
dockerizePip: true
provider:
name: aws
runtime: python3.7
stage: ${opt:stage, 'dev'}
profile: smartshare-sls
environment:
accountId: ${self:custom.env.accountId}
DB_HOST: ${self:custom.env.db.${self:provider.stage}.hostname}
DB_PORT: ${self:custom.env.db.${self:provider.stage}.port}
DB_USER: ${self:custom.env.db.${self:provider.stage}.user}
DB_PASS: ${self:custom.env.db.${self:provider.stage}.pass}
DB_ENGINE: ${self:custom.env.db.${self:provider.stage}.db_engine}
DB_NAME: ${self:custom.env.db.${self:provider.stage}.db_name}
LIVE: "1"
# region: ${opt:region, us-east-1}
package:
individually: true
exclude:
- .git/**
include:
- modules/*
- lib/*
functions:
login:
handler: functions/login/handler.handler
events:
- http:
path: login
method: post
signup:
handler: functions/signup/handler.handler
events:
- http:
path: signup
method: post
pets:
handler: functions/pets/handler.handler
events:
- http:
path: pets
method: post
plugins:
- serverless-python-requirements