Deploying NixOS to Amazon EC2
- Launching an EC2 instance
- Building NixOS locally
- Deploying a local build
- Show notes
- 5 videos, 36 minutes total
Most of the code that powers the Type Classes website is written in Haskell and running on Amazon EC2. In this project we walk through the process of how we developed our deploy process. We start by clicking around in the AWS web console, and we end up with some scripts and a fairly simple process that we now use to provision our servers from the command line.
We use these command-line tools:
nix-build, to compile everything that runs on our sever
nix-copy-closure, to upload build results to the server
ssh, to activate changes on the server and switch to a new build
The scripts we write here are written in Haskell, using:
- a Stack
turtlepackage to run shell commands
neat-interpolationpackage with the
You can see the final results in the Type Classes projects GitHub repository.