1{ lib, pkgs, ... }:
2
3{
4 name = "crabfit";
5
6 meta.maintainers = [ ];
7
8 nodes = {
9 machine =
10 { pkgs, ... }:
11 {
12 services.crabfit = {
13 enable = true;
14
15 frontend.host = "http://127.0.0.1:3001";
16 api.host = "127.0.0.1:3000";
17 };
18 };
19 };
20
21 # TODO: Add a reverse proxy and a dns entry for testing
22 testScript = ''
23 machine.wait_for_unit("crabfit-api")
24 machine.wait_for_unit("crabfit-frontend")
25
26 machine.wait_for_open_port(3000)
27 machine.wait_for_open_port(3001)
28
29 machine.succeed("curl -f http://localhost:3001/")
30 '';
31}