blueberry/saerro: startup order
This commit is contained in:
parent
8aa5cf6ac6
commit
ea83ef19a1
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,9 @@
|
|||
"--pod=saerro"
|
||||
"--pull=always"
|
||||
];
|
||||
autoStart = true;
|
||||
};
|
||||
ctrToSysd = names: map (x: "podman-saerro_${x}.service") names;
|
||||
in {
|
||||
|
||||
sops.secrets.saerro = {
|
||||
|
@ -23,6 +25,7 @@ in {
|
|||
PORT = port 1;
|
||||
WEBSOCKET_HEALTHCHECK = "http://127.0.0.1:${port 2}/healthz";
|
||||
};
|
||||
dependsOn = [ "saerro_maint" "saerro_postgres" ];
|
||||
} // containerGenerics;
|
||||
|
||||
saerro_ws = {
|
||||
|
@ -31,11 +34,13 @@ in {
|
|||
PORT = port 2;
|
||||
WORLDS = "all";
|
||||
};
|
||||
dependsOn = [ "saerro_maint" "saerro_postgres" ];
|
||||
} // containerGenerics;
|
||||
|
||||
saerro_maint = {
|
||||
image = image "tasks";
|
||||
cmd = [ "auto-maintenance" ];
|
||||
dependsOn = [ "saerro_postgres" ];
|
||||
} // containerGenerics;
|
||||
|
||||
saerro_postgres = {
|
||||
|
@ -48,7 +53,7 @@ in {
|
|||
|
||||
systemd.services.create-saerro-pod = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = map (x: "podman-saerro_${x}.service") [ "api" "ws" "maint" "postgres" ];
|
||||
wantedBy = ctrToSysd [ "api" "ws" "maint" "postgres" ];
|
||||
script = ''
|
||||
${pkgs.podman}/bin/podman pod exists saerro || \
|
||||
${pkgs.podman}/bin/podman pod create -n saerro -p '0.0.0.0:${port 1}:${port 1}'
|
||||
|
|
Loading…
Add table
Reference in a new issue