This repository contains the AWS CDK TypeScript code for deploying the LangFuse application using Amazon Elastic Container Registry (ECR) and Amazon Elastic Container Service (ECS).
The repository defines multiple CDK stacks for deploying the various components of the LangFuse application:
LangfuseEcrDeploymentCdkStack: Deploys Docker images to an Amazon ECR repository.LangfuseVpcDeploymentCdkStack: Deploys a VPC suitable for ECS deployments.CdkPostgreSQLDeploymentStack: Deploys a PostgreSQL database instance.CdkFargateWithVpcDeploymentStack: Deploys the application using AWS Fargate within a VPC.CdkAppRunnerWithVpcDeploymentStack: Deploys the application using AWS App Runner with a VPC connector.
The deployment configuration relies on environment variables defined in a .env file. An example of the .env file content is provided in the file .env.example.
To use this repository, ensure that you have AWS CDK installed and configured with appropriate AWS credentials. Clone the repository, install dependencies, and run the deployment scripts as needed.
build: Compiles TypeScript to JavaScript.npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testsnpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation template
@types/jest: TypeScript definitions for Jest.@types/node: TypeScript definitions for Node.js.aws-cdk: AWS Cloud Development Kit.jest: JavaScript testing framework.ts-jest: Jest transformer for TypeScript.ts-node: TypeScript execution environment for node.typescript: TypeScript language support.
@aws-cdk/aws-apprunner-alpha: AWS CDK App Runner resources.@cdklabs/cdk-ecs-codedeploy: AWS CDK library for ECS CodeDeploy.aws-cdk-lib: AWS CDK standard library.cdk-ecr-deployment: AWS CDK construct library to deploy Docker images to ECR.constructs: Constructs programming model for CDK.dotenv: Loads environment variables from a.envfile.source-map-support: Source map support for stack traces in node.
This repository is licensed under the MIT License. See the LICENSE file for details.


