ci: add Dockerfile

This commit is contained in:
cătălin 2023-12-09 11:15:39 +01:00
commit 65a56f2658
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2
15 changed files with 382 additions and 70 deletions

View file

@ -5,9 +5,9 @@ import anyio
from secretsanta.domain import Group
from secretsanta.repo import S3Repo
from secretsanta.service import (
CreateGroupService,
GetGroupParticipantsService,
GetPairService,
CreateGroupService,
)
from secretsanta.settings import get_config

View file

@ -26,16 +26,16 @@ custom:
dockerizePip: true
zip: true
slim: true
layer: true
prune:
automatic: true
includeLayers: true
number: 1
apiGatewayCaching:
enabled: true
apiGatewayThrottling:
maxRequestsPerSecond: 100
maxConcurrentRequests: 5
layer: false
#prune:
# automatic: true
# includeLayers: true
# number: 1
#apiGatewayCaching:
# enabled: true
#apiGatewayThrottling:
# maxRequestsPerSecond: 100
# maxConcurrentRequests: 5
plugins:
- serverless-python-requirements
@ -47,27 +47,25 @@ plugins:
functions:
get_participants:
handler: app.get_participants
layers:
- Ref: PythonRequirementsLambdaLayer
events:
- httpApi:
path: /api/v1/groups/{group_uuid}
method: get
create_group:
handler: app.create_group
layers:
- Ref: PythonRequirementsLambdaLayer
events:
- httpApi:
path: /api/v1/groups/{group_uuid}
method: put
#create_group:
# handler: app.create_group
# layers:
# - Ref: PythonRequirementsLambdaLayer
# events:
# - httpApi:
# path: /api/v1/groups/{group_uuid}
# method: put
get_pair:
handler: app.get_pair
layers:
- Ref: PythonRequirementsLambdaLayer
events:
- httpApi:
path: /api/v1/groups/{group_uuid}/pair/{participant}
method: get
#get_pair:
# handler: app.get_pair
# layers:
# - Ref: PythonRequirementsLambdaLayer
# events:
# - httpApi:
# path: /api/v1/groups/{group_uuid}/pair/{participant}
# method: get