mirror of
https://github.com/juspay/services-flake.git
synced 2024-11-12 18:08:30 +03:00
Namespaces (#57)
This commit is contained in:
parent
b3f9b375b4
commit
b9ab7fb711
@ -70,11 +70,11 @@
|
||||
},
|
||||
"process-compose-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1693927910,
|
||||
"narHash": "sha256-qPKHnWWzHS2bAi/SsFePQkGFeC2E1jklUjEidfQwYLc=",
|
||||
"lastModified": 1695992918,
|
||||
"narHash": "sha256-5tHNbk0ldLUjAqKRZog/3asiVvkD51VGK9TvwzUBs38=",
|
||||
"owner": "Platonic-Systems",
|
||||
"repo": "process-compose-flake",
|
||||
"rev": "5494afa0b6a7bc4ccf82ef1c36fe1fcdb4217255",
|
||||
"rev": "1ebecb83f15736f5d4ae3feb01a8391977dd71da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -144,6 +144,7 @@ with lib;
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
availability.restart = "on_failure";
|
||||
};
|
||||
|
@ -188,6 +188,7 @@ in
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
# https://github.com/F1bonacc1/process-compose#-auto-restart-if-not-healthy
|
||||
availability.restart = "on_failure";
|
||||
|
@ -260,12 +260,14 @@ in
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
# https://github.com/F1bonacc1/process-compose#-auto-restart-if-not-healthy
|
||||
availability.restart = "on_failure";
|
||||
};
|
||||
"${name}-configure" = {
|
||||
command = "${configureScript}/bin/configure-mysql";
|
||||
namespace = name;
|
||||
depends_on."${name}".condition = "process_healthy";
|
||||
};
|
||||
};
|
||||
|
@ -269,7 +269,7 @@ in
|
||||
{
|
||||
processes = {
|
||||
# DB initialization
|
||||
"${name}-init".command =
|
||||
"${name}-init" =
|
||||
let
|
||||
setupInitialDatabases =
|
||||
if config.initialDatabases != [ ] then
|
||||
@ -368,10 +368,13 @@ in
|
||||
cp ${configFile} "$PGDATA/postgresql.conf"
|
||||
'';
|
||||
in
|
||||
''
|
||||
export PGDATA="${config.dataDir}"
|
||||
${lib.getExe setupScript}
|
||||
'';
|
||||
{
|
||||
command = ''
|
||||
export PGDATA="${config.dataDir}"
|
||||
${lib.getExe setupScript}
|
||||
'';
|
||||
namespace = name;
|
||||
};
|
||||
|
||||
# DB process
|
||||
${name} =
|
||||
@ -405,6 +408,7 @@ in
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
# https://github.com/F1bonacc1/process-compose#-auto-restart-if-not-healthy
|
||||
availability.restart = "on_failure";
|
||||
};
|
||||
|
@ -114,6 +114,7 @@ in
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
# https://github.com/F1bonacc1/process-compose#-auto-restart-if-not-healthy
|
||||
availability.restart = "on_failure";
|
||||
@ -125,6 +126,7 @@ in
|
||||
"${name}-cluster-create" = {
|
||||
depends_on = lib.mapAttrs' (nodeName: cfg: lib.nameValuePair "${name}-${nodeName}" { condition = "process_healthy"; }) config.nodes;
|
||||
command = "${config.package}/bin/redis-cli --cluster create ${lib.concatStringsSep " " hosts} --cluster-replicas ${builtins.toString config.replicas} --cluster-yes";
|
||||
namespace = name;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -78,6 +78,7 @@ in
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
# https://github.com/F1bonacc1/process-compose#-auto-restart-if-not-healthy
|
||||
availability.restart = "on_failure";
|
||||
|
@ -144,6 +144,7 @@ with lib;
|
||||
success_threshold = 1;
|
||||
failure_threshold = 5;
|
||||
};
|
||||
namespace = name;
|
||||
|
||||
availability.restart = "on_failure";
|
||||
};
|
||||
|
@ -54,11 +54,11 @@
|
||||
},
|
||||
"process-compose-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1693927910,
|
||||
"narHash": "sha256-qPKHnWWzHS2bAi/SsFePQkGFeC2E1jklUjEidfQwYLc=",
|
||||
"lastModified": 1695992918,
|
||||
"narHash": "sha256-5tHNbk0ldLUjAqKRZog/3asiVvkD51VGK9TvwzUBs38=",
|
||||
"owner": "Platonic-Systems",
|
||||
"repo": "process-compose-flake",
|
||||
"rev": "5494afa0b6a7bc4ccf82ef1c36fe1fcdb4217255",
|
||||
"rev": "1ebecb83f15736f5d4ae3feb01a8391977dd71da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
Loading…
Reference in New Issue
Block a user