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"
|
"--pod=saerro"
|
||||||
"--pull=always"
|
"--pull=always"
|
||||||
];
|
];
|
||||||
|
autoStart = true;
|
||||||
};
|
};
|
||||||
|
ctrToSysd = names: map (x: "podman-saerro_${x}.service") names;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
sops.secrets.saerro = {
|
sops.secrets.saerro = {
|
||||||
|
@ -23,6 +25,7 @@ in {
|
||||||
PORT = port 1;
|
PORT = port 1;
|
||||||
WEBSOCKET_HEALTHCHECK = "http://127.0.0.1:${port 2}/healthz";
|
WEBSOCKET_HEALTHCHECK = "http://127.0.0.1:${port 2}/healthz";
|
||||||
};
|
};
|
||||||
|
dependsOn = [ "saerro_maint" "saerro_postgres" ];
|
||||||
} // containerGenerics;
|
} // containerGenerics;
|
||||||
|
|
||||||
saerro_ws = {
|
saerro_ws = {
|
||||||
|
@ -31,11 +34,13 @@ in {
|
||||||
PORT = port 2;
|
PORT = port 2;
|
||||||
WORLDS = "all";
|
WORLDS = "all";
|
||||||
};
|
};
|
||||||
|
dependsOn = [ "saerro_maint" "saerro_postgres" ];
|
||||||
} // containerGenerics;
|
} // containerGenerics;
|
||||||
|
|
||||||
saerro_maint = {
|
saerro_maint = {
|
||||||
image = image "tasks";
|
image = image "tasks";
|
||||||
cmd = [ "auto-maintenance" ];
|
cmd = [ "auto-maintenance" ];
|
||||||
|
dependsOn = [ "saerro_postgres" ];
|
||||||
} // containerGenerics;
|
} // containerGenerics;
|
||||||
|
|
||||||
saerro_postgres = {
|
saerro_postgres = {
|
||||||
|
@ -48,7 +53,7 @@ in {
|
||||||
|
|
||||||
systemd.services.create-saerro-pod = {
|
systemd.services.create-saerro-pod = {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
wantedBy = map (x: "podman-saerro_${x}.service") [ "api" "ws" "maint" "postgres" ];
|
wantedBy = ctrToSysd [ "api" "ws" "maint" "postgres" ];
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.podman}/bin/podman pod exists saerro || \
|
${pkgs.podman}/bin/podman pod exists saerro || \
|
||||||
${pkgs.podman}/bin/podman pod create -n saerro -p '0.0.0.0:${port 1}:${port 1}'
|
${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