Solved the edge case of Loki failing at first startup due to folders not initialized.
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 3m26s
Some checks failed
Build Nix modules (dry-run) / build-modules (push) Failing after 3m26s
This commit is contained in:
parent
0270bbac6f
commit
7fdee70cec
3 changed files with 62 additions and 55 deletions
|
|
@ -136,4 +136,16 @@
|
|||
|
||||
networking.firewall.allowedTCPPorts = [3100 9001];
|
||||
networking.firewall.allowedUDPPorts = [3100 9001];
|
||||
|
||||
systemd.services."loki-create-dirs" = {
|
||||
description = "Create Loki runtime/storage directories";
|
||||
after = ["network.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = '' ${pkgs.bash}/bin/bash -c "set -eu; \
|
||||
mkdir -p /var/loki /var/loki/compactor
|
||||
'';
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue