Skip to content

Automate deploying Lemmy to AWS using CDK

Notifications You must be signed in to change notification settings

dvejmz/lemmy-cdk

 
 

Repository files navigation

Lemmy AWS CDK

Lemmy is a Reddit-style federated social network that speaks ActivityPub. It is written in Rust.

This contains the necessary infrastructure definitions to deploy Lemmy to AWS using their Cloud Development Kit.

Included:

  • ECS fargate cluster
    • Lemmy-UI
    • Lemmy
    • Pictrs
    • IFramely
  • CloudFront CDN
  • EFS storage for image uploads
  • Aurora Serverless Postgres DB
  • Bastion VPC host
  • Load balancers for Lemmy and IFramely
  • DNS records for your site

Quickstart

Clone Lemmy and Lemmy-UI to the directory above this.

cp example.env.local .env.local
# edit .env.local

You should edit .env.local with your site settings.

npm install -g aws-cdk
npm install
cdk bootstrap
cdk deploy

Cost

This is not the cheapest way to run Lemmy. The Serverless Aurora DB can run you ~$90/mo if it doesn't go to sleep.

Useful CDK commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

About

Automate deploying Lemmy to AWS using CDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.6%
  • JavaScript 4.0%
  • Shell 1.4%