Loggest thine Stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

110 lines
3.2 KiB

service: stufflog3
frameworkVersion: '3'
provider:
name: aws
runtime: go1.x
memorySize: 512
stage: prod
region: ${env:STUFFLOG3_AWS_REGION}
role: ${env:IAM_ROLE}
tags:
Name: Stufflog3
Type: Application
apiGateway:
shouldStartNameWithService: true
minimumCompressionSize: 2048
binaryMediaTypes:
- 'image/jpeg'
- 'image/png'
- 'image/*'
versionFunctions: false
environment:
STUFFLOG3_AWS_CLIENT_ID: ${env:STUFFLOG3_AWS_CLIENT_ID}
STUFFLOG3_AWS_CLIENT_SECRET: ${env:STUFFLOG3_AWS_CLIENT_SECRET}
STUFFLOG3_AWS_POOL_CLIENT_ID: ${env:STUFFLOG3_AWS_POOL_CLIENT_ID}
STUFFLOG3_AWS_POOL_CLIENT_SECRET: ${env:STUFFLOG3_AWS_POOL_CLIENT_SECRET}
STUFFLOG3_AWS_POOL_ID: ${env:STUFFLOG3_AWS_POOL_ID}
STUFFLOG3_AWS_REGION: ${env:STUFFLOG3_AWS_REGION}
STUFFLOG3_MYSQL_HOST: ${env:STUFFLOG3_MYSQL_HOST}
STUFFLOG3_MYSQL_PASSWORD: ${env:STUFFLOG3_MYSQL_PASSWORD}
STUFFLOG3_MYSQL_PORT: ${env:STUFFLOG3_MYSQL_PORT}
STUFFLOG3_MYSQL_SCHEMA: ${env:STUFFLOG3_MYSQL_SCHEMA}
STUFFLOG3_MYSQL_USERNAME: ${env:STUFFLOG3_MYSQL_USERNAME}
functions:
handleApi:
runtime: go1.x
handler: ./build/handler
package:
include:
- ./build/handler
events:
- http:
method: ANY
path: /api/{proxy+}
timeout: 15
package:
individually: true
exclude:
- ./**
plugins:
- serverless-domain-manager
- serverless-apigateway-service-proxy
custom:
webuiBucket: ${env:S3_WEBUI_BUCKET}
apiGatewayServiceProxies:
- s3:
path: /_app/{myPath+}
method: get
action: GetObject
bucket: ${self:custom.webuiBucket}
pathOverride: '_app/{myPath}'
roleArn: ${self:provider.role}
requestParameters:
'integration.request.path.myPath': 'method.request.path.myPath'
'integration.request.path.object': 'method.request.path.myPath'
'integration.request.header.cache-control': "'public, max-age=86400, immutable'"
- s3:
path: /favicon.png
method: get
action: GetObject
bucket: ${self:custom.webuiBucket}
roleArn: ${self:provider.role}
requestParameters:
'integration.request.path.myPath': 'method.request.path.myPath'
'integration.request.path.object': 'method.request.path.myPath'
'integration.request.header.cache-control': "'public, max-age=86400, immutable'"
- s3:
path: /
method: get
action: GetObject
bucket: ${self:custom.webuiBucket}
roleArn: ${self:provider.role}
key: index.html
requestParameters:
'integration.request.header.cache-control': "'public, max-age=86400, immutable'"
- s3:
path: /{myPath+}
method: get
action: GetObject
bucket: ${self:custom.webuiBucket}
roleArn: ${self:provider.role}
key: index.html
requestParameters:
'integration.request.header.cache-control': "'public, max-age=86400, immutable'"
customDomain:
domainName: ${env:DOMAIN_NAME}
basePath: ''
certificateName: ${env:CERTIFICATE_NAME}
certificateArn: ${env:CERTIFICATE_ARN}
createRoute53Record: true
endpointType: 'regional'
hostedZoneId: ${env:HOSTED_ZONE_ID}
autoDomain: true