This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "", | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [] | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class FindDogIntentHandler implements RequestHandler { | |
canHandle(handlerInput: HandlerInput): boolean { | |
const request = handlerInput.requestEnvelope.request; | |
return ((request.type === 'IntentRequest' && request.intent.name === 'FindADogIntent' && request.dialogState == 'COMPLETED') | |
|| (handlerInput.requestEnvelope.request.type === 'LaunchRequest')); | |
} | |
async handle(handlerInput: HandlerInput): Promise<Response> { | |
const { requestEnvelope, serviceClientFactory, responseBuilder } = handlerInput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"create-stack-dev": "npm run private-zip-pipeline-functions && npm run private-setup-template-bucket-dev && npm run private-push-stack-to-s3-dev && npm run private-create-stack-dev", | |
"update-stack-dev": "npm run private-zip-pipeline-functions && npm run private-push-stack-to-s3-dev && npm run private-update-stack-dev", | |
"private-setup-template-bucket-dev": "(aws s3api get-bucket-location --profile %npm_package_config_profileDev% --bucket %npm_package_config_s3TemplateBucketDev% --region %npm_package_config_region% || npm run private-create-template-bucket-dev)", | |
"private-create-template-bucket-dev": "aws s3 mb %npm_package_config_s3TemplateBucketLocationDev% --profile %npm_package_config_profileDev% --region %npm_package_config_region%", | |
"private-push-stack-to-s3-dev": "aws s3 cp %npm_package_config_template% %npm_package_config_s3TemplateBucketLocationDev% --profile %npm_package_config_profileDev% --region %npm_package_config_region%", | |
"private-create-stack-dev": "aws cl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "SPA Infrastructure Template", | |
"Parameters": { | |
"CodeBuildProjectNameParameter": { | |
"Type": "String", | |
"Description": "A name for the CodeBuild project. The name must be unique across all of the projects in your AWS account." | |
}, | |
"CodeBuildImageParameter": { | |
"Type": "String", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
exports.handler = (event, context, callback) => { | |
const cloudfront = new AWS.CloudFront(); | |
const codepipeline = new AWS.CodePipeline(); | |
//job id passed into fn by CP | |
const jobId = event["CodePipeline.job"].id; | |
let cfInvalidationParams = { | |
DistributionId: process.env.CloudfrontDistId, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
exports.handler = (event, context, callback) => { | |
const sourceBucket = process.env.SourceBucket; | |
const destBucket = process.env.DestBucket; | |
const assetPrefix = process.env.AssetPrefix; | |
const s3 = new AWS.S3({params: {Bucket: sourceBucket}, region: 'us-west-2', "signatureVersion":"v4"}); | |
const codepipeline = new AWS.CodePipeline(); | |
//job id passed into fn by CP | |
const jobId = event["CodePipeline.job"].id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"install-dependencies": "npm install && cd %npm_package_config_infrastructureDirName% && npm install && cd ../%npm_package_config_lambdaDirName% && npm install", | |
"first-init-dev": "npx cdk bootstrap aws://%npm_package_config_devAccountNumber%/%npm_package_config_region% --profile %npm_package_config_devProfile%", | |
"first-init-prod": "npx cdk bootstrap aws://%npm_package_config_prodAccountNumber%/%npm_package_config_region% --profile %npm_package_config_prodProfile%", | |
"check-cdk-updates": "cd %npm_package_config_infrastructureDirName% && npx npm-check-updates -u", | |
"install-cdk-updates": "cd %npm_package_config_infrastructureDirName% && npm install", | |
"make-cdk-app": "mkdir %npm_package_config_infrastructureDirName% && cd %npm_package_config_infrastructureDirName% && npx cdk init --language typescript && npm run build", | |
"synth-stack": "cd %npm_package_config_infrastructureDirName% && npm run build && npx cdk synth", | |
"list-stacks": "cd %npm_package_config_infrastructureDirName% && n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"build": "tsc", | |
"update-lambda-code-dev": "npm run build && npm run private-remove-package && npm run private-package-lambda && npm run private-update-lambda-code-dev", | |
"update-lambda-code-prod": "npm run build && npm run private-remove-package && npm run private-package-lambda && npm run private-update-lambda-code-prod", | |
"private-update-lambda-code-dev": "aws lambda update-function-code --profile %npm_package_config_devProfile% --region %npm_package_config_region% --function-name %npm_package_config_functionNameDev% --zip-file %npm_package_config_functionFileLocationNormalized%", | |
"private-update-lambda-code-prod": "aws lambda update-function-code --profile %npm_package_config_prodProfile% --region %npm_package_config_region% --function-name %npm_package_config_functionNameProd% --zip-file %npm_package_config_functionFileLocationNormalized%", | |
"private-package-lambda": "zip -q -r %npm_package_config_functionFileName% ./lib index.js node_modules", | |
"private-remove-package": "rm %npm_p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
backend: | |
container_name: backend | |
image: docker.io/desoprotocol/backend:stable | |
command: run | |
volumes: | |
- db:/db | |
ports: | |
- 17001:17001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/docker-compose-app.service | |
# thanks to oleg belostotsky on stack overflow for this | |
[Unit] | |
Description=Docker Compose Application Service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Type=oneshot |
OlderNewer