mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-11 12:26:04 +03:00
19 lines
435 B
Nix
19 lines
435 B
Nix
{ pkgs, config, ... }: {
|
|
services.redis."redis1".enable = true;
|
|
|
|
settings.processes.test =
|
|
let
|
|
cfg = config.services.redis."redis1";
|
|
in
|
|
{
|
|
command = pkgs.writeShellApplication {
|
|
runtimeInputs = [ cfg.package pkgs.gnugrep ];
|
|
text = ''
|
|
redis-cli ping | grep -q "PONG"
|
|
'';
|
|
name = "redis-test";
|
|
};
|
|
depends_on."redis1".condition = "process_healthy";
|
|
};
|
|
}
|