switch back to one agent and stable server version

This commit is contained in:
Cyryl Płotnicki 2022-11-08 19:25:33 +00:00
parent 2c9efeabf4
commit 8b51ffa8df

View file

@ -5,17 +5,6 @@ let
domain = "ci.cyplo.dev"; domain = "ci.cyplo.dev";
path = "/var/lib/woodpecker"; path = "/var/lib/woodpecker";
serverContainerName = "woodpecker-server"; serverContainerName = "woodpecker-server";
agent = {
dependsOn = [ "${serverContainerName}" ];
volumes = [ "/var/run/podman/podman.sock:/var/run/docker.sock" ];
image =
"woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
environmentFiles = [ "${config.sops.secrets.gitea-env.path}" ];
environment = {
WOODPECKER_SERVER = "woodpecker-server:${toString agentPort}";
WOODPECKER_MAX_PROCS = "2";
};
};
in { in {
imports = [ ../nginx.nix ]; imports = [ ../nginx.nix ];
@ -40,7 +29,7 @@ in {
virtualisation.podman.defaultNetwork.dnsname.enable = true; virtualisation.podman.defaultNetwork.dnsname.enable = true;
virtualisation.oci-containers.containers."${serverContainerName}" = { virtualisation.oci-containers.containers."${serverContainerName}" = {
image = image =
"woodpeckerci/woodpecker-server@sha256:37460d99638e05b75b3e6f9ea915f6922316c134d3caf8453f7c2716e9fb830c"; "woodpeckerci/woodpecker-server@sha256:e6027e46a782d50790183b7274a2a2ad3a6c6fb9a645e6af81a16419613c28ea";
volumes = [ "woodpecker-server-data:${path}" ]; volumes = [ "woodpecker-server-data:${path}" ];
environmentFiles = [ "${config.sops.secrets.gitea-env.path}" ]; environmentFiles = [ "${config.sops.secrets.gitea-env.path}" ];
environment = { environment = {
@ -53,6 +42,15 @@ in {
ports = [ "${toString httpPort}:${toString httpPort}" ]; ports = [ "${toString httpPort}:${toString httpPort}" ];
}; };
virtualisation.oci-containers.containers.woodpecker-agent1 = agent; virtualisation.oci-containers.containers.woodpecker-agent = {
virtualisation.oci-containers.containers.woodpecker-agent2 = agent; dependsOn = [ "${serverContainerName}" ];
volumes = [ "/var/run/podman/podman.sock:/var/run/docker.sock" ];
image =
"woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
environmentFiles = [ "${config.sops.secrets.gitea-env.path}" ];
environment = {
WOODPECKER_SERVER = "woodpecker-server:${toString agentPort}";
WOODPECKER_MAX_PROCS = "2";
};
};
} }