up number of containers to 4
This commit is contained in:
parent
e42f3c95c6
commit
f6b61b09e2
1 changed files with 63 additions and 59 deletions
|
@ -21,6 +21,65 @@
|
|||
};
|
||||
woodpeckerEnvSecretName = "woodpecker-env";
|
||||
woodpeckerEnvSecretPath = "/run/secrets/${woodpeckerEnvSecretName}";
|
||||
woodpeckerAgentContainer = {
|
||||
autoStart = true;
|
||||
forwardPorts = [
|
||||
];
|
||||
bindMounts = {
|
||||
"${woodpeckerEnvSecretPath}" = {
|
||||
hostPath = "${woodpeckerEnvSecretPath}";
|
||||
isReadOnly = true;
|
||||
};
|
||||
"/var/run/docker.sock" = {
|
||||
hostPath = "/var/run/podman/podman.sock";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
system.stateVersion = "22.11";
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
allowNoPasswordLogin = true;
|
||||
users."${systemUserName}" = {
|
||||
inherit uid;
|
||||
isSystemUser = true;
|
||||
isNormalUser = false;
|
||||
group = systemGroupName;
|
||||
};
|
||||
groups."${systemGroupName}" = {
|
||||
inherit gid;
|
||||
members = ["${systemUserName}"];
|
||||
};
|
||||
groups."podman" = {
|
||||
gid = podmanGid;
|
||||
members = ["${systemUserName}"];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.woodpecker-agent = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "${domain}:${toString agentPort}";
|
||||
WOODPECKER_MAX_PROCS = "1";
|
||||
WOODPECKER_DEBUG_PRETTY = "true";
|
||||
WOODPECKER_LOG_LEVEL = "info";
|
||||
};
|
||||
serviceConfig = {
|
||||
EnvironmentFile = [
|
||||
woodpeckerEnvSecretPath
|
||||
];
|
||||
ExecStart = "${pkgs.woodpecker-agent}/bin/woodpecker-agent";
|
||||
User = systemUserName;
|
||||
Group = systemGroupName;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [../nginx.nix];
|
||||
|
||||
|
@ -90,63 +149,8 @@ in {
|
|||
];
|
||||
};
|
||||
};
|
||||
containers.woodpecker-agent1 = {
|
||||
autoStart = true;
|
||||
forwardPorts = [
|
||||
];
|
||||
bindMounts = {
|
||||
"${woodpeckerEnvSecretPath}" = {
|
||||
hostPath = "${woodpeckerEnvSecretPath}";
|
||||
isReadOnly = true;
|
||||
};
|
||||
"/var/run/docker.sock" = {
|
||||
hostPath = "/var/run/podman/podman.sock";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
system.stateVersion = "22.11";
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
allowNoPasswordLogin = true;
|
||||
users."${systemUserName}" = {
|
||||
inherit uid;
|
||||
isSystemUser = true;
|
||||
isNormalUser = false;
|
||||
group = systemGroupName;
|
||||
};
|
||||
groups."${systemGroupName}" = {
|
||||
inherit gid;
|
||||
members = ["${systemUserName}"];
|
||||
};
|
||||
groups."podman" = {
|
||||
gid = podmanGid;
|
||||
members = ["${systemUserName}"];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.woodpecker-agent = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "${domain}:${toString agentPort}";
|
||||
WOODPECKER_MAX_PROCS = "1";
|
||||
WOODPECKER_DEBUG_PRETTY = "true";
|
||||
WOODPECKER_LOG_LEVEL = "info";
|
||||
};
|
||||
serviceConfig = {
|
||||
EnvironmentFile = [
|
||||
woodpeckerEnvSecretPath
|
||||
];
|
||||
ExecStart = "${pkgs.woodpecker-agent}/bin/woodpecker-agent";
|
||||
User = systemUserName;
|
||||
Group = systemGroupName;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
containers.woodpecker-agent1 = woodpeckerAgentContainer;
|
||||
containers.woodpecker-agent2 = woodpeckerAgentContainer;
|
||||
containers.woodpecker-agent3 = woodpeckerAgentContainer;
|
||||
containers.woodpecker-agent4 = woodpeckerAgentContainer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue