summaryrefslogtreecommitdiff
path: root/docs/deployment.md
blob: 34383016ddf03e195f88245411225a3c95f61c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Deployment Documentation for CrashOverBurn Web Server

## Overview

This document outlines the deployment process for the CrashOverBurn web server to the target host `crash-over-burn-1` at IP address `193.16.42.36`.

## Prerequisites

- Nix with flakes enabled
- SSH access to the target host
- Secrix keys configured

## Deployment Commands

### Validate
```
nix flake check --option builders ''
```

### Build
```
nix build .#nixosConfigurations.crash-over-burn-1.config.system.build.toplevel --option builders ''
```

### Deploy via nixinate
```
nix run .#crash-over-burn-1
```

## Secrix Commands

### Validate recipients
```
nix run .#secrix -- -l
```

### Encrypt a new secret
```
nix run .#secrix encrypt ./secrets/<path> -- --all-users -s crash-over-burn-1
```

## Post-Deployment

- Verify services are running
- Check logs: `journalctl -u uwsgi` etc.

## Rollback Procedure

If deployment fails, rollback to the previous system generation by running:
```
sudo nixos-rebuild switch --rollback
```
on the target host. This will revert to the last known good configuration.