rate limiting and database saving works

This commit is contained in:
2026-10-15 23:45:11 -04:00
parent 1093066598
commit 34841fa222
3 changed files with 65 additions and 11 deletions
+6 -3
View File
@@ -81,16 +81,19 @@
};
hooks = pkgs.writeText "pigeon-hooks.json"
(builtins.replaceStrings [ "@pigeon@" ] [ "${pigeon}/bin/pigeon" ]
(builtins.readFile ./hooks.json));
(builtins.replaceStrings [ "@nq@" "@pigeon@" ]
[ "${pkgs.nq}/bin/nq" "${pigeon}/bin/pigeon" ]
(builtins.readFile ./hooks.json));
pigeon-webhook = pkgs.writeShellApplication {
name = "pigeon-webhook";
runtimeInputs = with pkgs; [ webhook ];
runtimeInputs = with pkgs; [ coreutils nq sqlite webhook ];
text = ''
: "''${PIGEON_GITLAB_SECRET:?}"
: "''${PIGEON_GITLAB_TOKEN:?}"
: "''${PIGEON_PROJECTS:?}"
export NQDIR=./queue
exec webhook -hooks ${hooks} -template -port 3000 -verbose -debug
'';
};