nixos/gitlab: set gitaly runtime dir

If `runtime_dir` is not set, gitaly will use `/tmp` as a place for sockets
and packed binaries like `git2go`. If the gitlab instance does not experience
much traffic and gitlay is not restarted regularly, systemd-tmpfiles will
remove the binaries. This breaks some gitlab functionality until gitaly is
restarted manually.
This commit is contained in:
Franz Pletz 2023-01-13 11:26:52 +01:00
parent 9852294f15
commit b88913fb11
No known key found for this signature in database
GPG key ID: 846FDED7792617B4

View file

@ -40,6 +40,7 @@ let
gitalyToml = pkgs.writeText "gitaly.toml" ''
socket_path = "${lib.escape ["\""] gitalySocket}"
runtime_dir = "/run/gitaly"
bin_dir = "${cfg.packages.gitaly}/bin"
prometheus_listen_addr = "localhost:9236"
@ -1353,6 +1354,7 @@ in {
TimeoutSec = "infinity";
Restart = "on-failure";
WorkingDirectory = gitlabEnv.HOME;
RuntimeDirectory = "gitaly";
ExecStart = "${cfg.packages.gitaly}/bin/gitaly ${gitalyToml}";
};
};