-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathserverless.yml
38 lines (38 loc) · 1.03 KB
/
serverless.yml
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
service: TagBotWeb
plugins:
- serverless-domain-manager
- serverless-pseudo-parameters
- serverless-python-requirements
- serverless-wsgi
custom:
prod:
dev: false
prod: true
customDomain:
domainName: julia-tagbot.com
enabled: ${self:custom.prod.${opt:stage, 'dev'}}
reports: ${self:service}-${opt:stage, 'dev'}-reports
wsgi:
app: tagbot.web.app
provider:
name: aws
runtime: python3.12
iamRoleStatements:
- Effect: Allow
Action: lambda:InvokeFunction
Resource: arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${self:custom.reports}
environment:
GITHUB_TOKEN: ${env:GITHUB_TOKEN}
REPORTS_FUNCTION: ${self:custom.reports}
TAGBOT_REPO: ${env:TAGBOT_REPO, 'JuliaRegistries/TagBot'}
TAGBOT_ISSUES_REPO: ${env:TAGBOT_ISSUES_REPO, 'JuliaRegistries/TagBotErrorReports'}
functions:
api:
handler: wsgi_handler.handler
events:
- http: ANY /
- http: ANY /{any+}
reports:
handler: tagbot.web.reports.handler
reservedConcurrency: 1
timeout: 30