add process-compose.yaml for starting up dev env more conveniently #305

closed
opened by ptr.pet targeting master from [deleted fork]: process-compose

also adds a nix app that just points to process-compose to run it with nix run .#dev-compose. i didn't use process-compose nix module or provide the deps via nix, since doing that wouldn't let you be able to just restart commands in process-compose and pick up the newest changes (as opposed to restarting the entire process-compose which defeats the purpose of it).

+34
process-compose.yaml
··· 1 + env_cmds: 2 + OAUTH_JWKS: "nix run .#genjwks" 3 + 4 + processes: 5 + redis: 6 + command: nix shell nixpkgs#redis -c redis-server 7 + description: "run redis server" 8 + restart: on_failure 9 + ready_log_line: "Ready to accept connections" 10 + 11 + watch-tailwind: 12 + command: nix run .#watch-tailwind 13 + description: "watch and rebuild tailwind css" 14 + is_tty: true # needed because tailwindcss expects a tty 15 + restart: on_failure 16 + ready_log_line: "Done in " 17 + 18 + vm: 19 + command: nix run .#vm 20 + description: "run knot, spindle, ssh, etc." 21 + restart: on_failure 22 + ready_log_line: "nixos login: root (automatic login)" 23 + 24 + watch-appview: 25 + command: TANGLED_OAUTH_JWKS=$${OAUTH_JWKS} nix run .#watch-appview 26 + description: "watch and rebuild app view" 27 + restart: on_failure 28 + depends_on: 29 + watch-tailwind: 30 + condition: process_log_ready 31 + vm: 32 + condition: process_log_ready 33 + redis: 34 + condition: process_log_ready
+4
flake.nix
··· 170 170 ${pkgs.nixos-shell}/bin/nixos-shell --flake .#vm 171 171 ''); 172 172 }; 173 + dev-compose = { 174 + type = "app"; 175 + program = "${pkgs.process-compose}/bin/process-compose"; 176 + }; 173 177 }); 174 178 175 179 nixosModules.appview = import ./nix/modules/appview.nix {inherit self;};