barrucadu / lainonlife

RIP lainchan radio, taken out by HDD failure.
https://lainon.life
MIT License
54 stars 12 forks source link

Set up a staging site #34

Closed barrucadu closed 3 years ago

barrucadu commented 7 years ago

As evidenced by this morning, just checking configuration is syntactically valid and looks reasonable before deploying is a good way to cause downtime.

Fortunately, NixOS containers should make it trivial to run a staging site.

TypicalFence commented 7 years ago

I assume NixOS-containers only run on NixOS.

Wouldn't it be better to use a suited platform independent alternative to them? Like docker or vagrant or something like that.

barrucadu commented 7 years ago

The advantage of a NixOS container is that the server is already running NixOS, so I can start up a totally identical container like so:

$ sudo nixos-container create staging --config-file /etc/nixos/configuration.nix
$ sudo nixos-container start staging

The only thing to do probably is to hardlink some music files into the container and change its nginx and icecast ports and expose those ports on the public IP.