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:
parent
9852294f15
commit
b88913fb11
1 changed files with 2 additions and 0 deletions
|
@ -40,6 +40,7 @@ let
|
||||||
|
|
||||||
gitalyToml = pkgs.writeText "gitaly.toml" ''
|
gitalyToml = pkgs.writeText "gitaly.toml" ''
|
||||||
socket_path = "${lib.escape ["\""] gitalySocket}"
|
socket_path = "${lib.escape ["\""] gitalySocket}"
|
||||||
|
runtime_dir = "/run/gitaly"
|
||||||
bin_dir = "${cfg.packages.gitaly}/bin"
|
bin_dir = "${cfg.packages.gitaly}/bin"
|
||||||
prometheus_listen_addr = "localhost:9236"
|
prometheus_listen_addr = "localhost:9236"
|
||||||
|
|
||||||
|
@ -1353,6 +1354,7 @@ in {
|
||||||
TimeoutSec = "infinity";
|
TimeoutSec = "infinity";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
WorkingDirectory = gitlabEnv.HOME;
|
WorkingDirectory = gitlabEnv.HOME;
|
||||||
|
RuntimeDirectory = "gitaly";
|
||||||
ExecStart = "${cfg.packages.gitaly}/bin/gitaly ${gitalyToml}";
|
ExecStart = "${cfg.packages.gitaly}/bin/gitaly ${gitalyToml}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue