A blog made of containers!
- An already-configured hosted zone for your domain of choice on Route 53
- Terraform, for IaC configuration
- An authenticated AWS CLI, which Terraform uses to deploy infrastructure
- An authenticate GitHub CLI, which Terraform uses to deploy infrastructure
- Run the
publish-images
GitHub Action, to pushcontained
images to GHCR - Locally set up infrastructure with Terraform, using
terraform apply
- Run the
publish-frontend
GitHub Action - Visit your site, and enjoy!
Below is an architecture diagram of the infrastructure that this project deploys. The VPC, internet gateway, subnets and security groups have been omitted from the diagram for the sake of clarity.
The various components include
- A Route 53 Hosted Zone (which must be set up manually)
- A CloudFront distribution, which serves the frontend
- An S3 bucket, which stores the frontend (and is the origin for the CloudFront distribution)
- An application load balancer, which routes traffic to the backend
- An auto scaling group, which runs the backend and ensures there is at least one healthy instance running at all times
- An instance of the backend, which runs the blog
- AWS Certificate Manager, which issues certificates for the domain
- GitHub Container Registry, which stores images for the backend and sibling SSH server
- A GitHub Actions workflow with an IAM user for pushing the frontend to S3
- Creates a blog users can interact with via a web-based terminal
- Includes a good local development experience, including hot reloading for the primary server
- Infrastructure as code defined using Terraform
- Deployment pipelines defined using GitHub Actions
To contribute, you'll need the prerequisites listed above, along with the following installed on your machine.
- Docker, for containers. Docker Desktop is also helpful.
Future work for this project could involve
- Switch
packages/
to a monorepo using Nx or a similar tool - Deploying infrastructure with GitHub Actions, transitioning away from the default Terraform backend
- Adding syntax highlighting into the terminal, possibly through a utility that adds colour to code blocks
- Making scrolling on mobile smoother
- Updating the dimensions of the remote serial console to match the dimensions of the user's screen
- Handle SIGTERM in
server
(gracefully shut down, stop accepting new connections, close SSH servers)