· 6 years ago · Mar 31, 2020, 06:04 PM
1# Welcome to Serverless!
2#
3# This file is the main config file for your service.
4# It's very minimal at this point and uses default values.
5# You can always add more config options for more control.
6# We've included some commented out config examples here.
7# Just uncomment any of them to get that config option.
8#
9# For full config options, check the docs:
10# docs.serverless.com
11#
12# Happy Coding!
13
14service: api
15#app: your-app-name
16#tenant: your-tenant-name
17
18# You can pin your service to only deploy with a specific Serverless version
19# Check out our docs for more details
20# frameworkVersion: "=X.X.X"
21# sls plugin install -n serverless-wsgi
22# sls plugin install -n serverless-python-requirements
23# serverless config credentials --provider aws --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
24
25provider:
26 name: aws
27 runtime: python3.7
28 stage: ${opt:stage, 'development'}
29 region: sa-east-1
30 deploymentBucket: ifarmer-deploys
31 environment:
32 FLASK_ENV: "${opt:stage, 'development'}"
33 #vpc: ${file(vpc-${opt:stage, self:provider.stage}.yml)}
34
35
36
37plugins:
38 - serverless-wsgi
39 - serverless-python-requirements
40custom:
41 wsgi:
42 app: run.app
43 packRequirements: false
44 pythonRequirements:
45 dockerizePip: false
46 pythonBin: python
47package:
48 exclude:
49 - node_modules/**
50 - venv/**
51
52functions:
53 app:
54 handler: wsgi_handler.handler
55 timeout: 30
56 events:
57 - http: ANY /
58 - http: 'ANY {proxy+}'