2022-05-16 20:28:31 +02:00
|
|
|
service: vxTwitter
|
2022-05-15 02:14:41 +02:00
|
|
|
|
|
|
|
provider:
|
|
|
|
name: aws
|
2022-05-15 18:06:42 +02:00
|
|
|
runtime: python3.6
|
2022-05-16 20:28:31 +02:00
|
|
|
stage: dev
|
|
|
|
iamRoleStatements:
|
|
|
|
- Effect: Allow
|
|
|
|
Action:
|
|
|
|
- dynamodb:Query
|
|
|
|
- dynamodb:Scan
|
|
|
|
- dynamodb:GetItem
|
|
|
|
- dynamodb:PutItem
|
|
|
|
- dynamodb:UpdateItem
|
|
|
|
- dynamodb:DeleteItem
|
|
|
|
Resource:
|
|
|
|
- { "Fn::GetAtt": ["vxTwitterDynamoTable", "Arn" ] }
|
|
|
|
environment:
|
|
|
|
CACHE_TABLE: ${self:custom.tableName}
|
|
|
|
RUNNING_SERVERLESS: 1
|
|
|
|
VXTWITTER_LINK_CACHE: dynamodb
|
|
|
|
VXTWITTER_DATABASE: none
|
|
|
|
VXTWITTER_DATABASE_TABLE: none
|
|
|
|
VXTWITTER_METHOD: youtube-dl
|
|
|
|
VXTWITTER_COLOR: \#43B581
|
|
|
|
VXTWITTER_APP_NAME: vxTwitter
|
|
|
|
VXTWITTER_REPO: https://github.com/dylanpdx/BetterTwitFix
|
|
|
|
VXTWITTER_URL: https://vxtwitter.com
|
|
|
|
# Twitter API keys
|
|
|
|
VXTWITTER_TWITTER_API_KEY: none
|
|
|
|
VXTWITTER_TWITTER_API_SECRET: none
|
|
|
|
VXTWITTER_TWITTER_ACCESS_TOKEN: none
|
|
|
|
VXTWITTER_TWITTER_ACCESS_SECRET: none
|
2022-05-15 18:06:42 +02:00
|
|
|
|
|
|
|
package:
|
|
|
|
patterns:
|
|
|
|
- '!node_modules/**'
|
|
|
|
- '!venv/**'
|
2022-05-15 02:14:41 +02:00
|
|
|
|
|
|
|
plugins:
|
|
|
|
- serverless-wsgi
|
|
|
|
- serverless-python-requirements
|
2022-05-15 18:06:42 +02:00
|
|
|
- serverless-plugin-common-excludes
|
|
|
|
- serverless-plugin-include-dependencies
|
2022-05-15 02:14:41 +02:00
|
|
|
|
|
|
|
functions:
|
2022-05-16 20:28:31 +02:00
|
|
|
vxTwitterApp:
|
2022-05-15 02:14:41 +02:00
|
|
|
handler: wsgi_handler.handler
|
|
|
|
url: true
|
2022-05-15 18:06:42 +02:00
|
|
|
layers:
|
|
|
|
- Ref: PythonRequirementsLambdaLayer
|
|
|
|
|
2022-05-15 02:14:41 +02:00
|
|
|
|
|
|
|
custom:
|
2022-05-16 20:28:31 +02:00
|
|
|
tableName: 'users-table-${self:provider.stage}'
|
2022-05-15 02:14:41 +02:00
|
|
|
wsgi:
|
|
|
|
app: twitfix.app
|
|
|
|
pythonRequirements:
|
2022-05-15 18:06:42 +02:00
|
|
|
layer: true
|
2022-05-16 20:28:31 +02:00
|
|
|
dockerizePip: true
|
|
|
|
|
|
|
|
|
|
|
|
resources:
|
|
|
|
Resources:
|
|
|
|
vxTwitterDynamoTable:
|
|
|
|
Type: 'AWS::DynamoDB::Table'
|
|
|
|
Properties:
|
|
|
|
AttributeDefinitions:
|
|
|
|
-
|
|
|
|
AttributeName: tweet
|
|
|
|
AttributeType: S
|
|
|
|
KeySchema:
|
|
|
|
-
|
|
|
|
AttributeName: tweet
|
|
|
|
KeyType: HASH
|
|
|
|
ProvisionedThroughput:
|
|
|
|
ReadCapacityUnits: 1
|
|
|
|
WriteCapacityUnits: 1
|
|
|
|
TableName: ${self:custom.tableName}
|