From e7280b6eec59978c7f1aff0f186a61bec96b37e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 3 Dec 2022 15:41:34 +0000 Subject: [PATCH] use a separate container network for woodpecker, to be able to control the dns settings --- nixos/boxes/vpsfree1/woodpecker.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/boxes/vpsfree1/woodpecker.nix b/nixos/boxes/vpsfree1/woodpecker.nix index 832238e3..e7ae7578 100644 --- a/nixos/boxes/vpsfree1/woodpecker.nix +++ b/nixos/boxes/vpsfree1/woodpecker.nix @@ -40,6 +40,7 @@ in { WOODPECKER_GITEA_URL = "https://git.cyplo.dev"; }; ports = [ "${toString httpPort}:${toString httpPort}" ]; + extraOptions = [ "--network=woodpecker" ]; }; virtualisation.oci-containers.containers.woodpecker-agent = { @@ -49,8 +50,9 @@ in { "woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545"; environmentFiles = [ "${config.sops.secrets.gitea-env.path}" ]; environment = { - WOODPECKER_SERVER = "woodpecker-server:${toString agentPort}"; + WOODPECKER_SERVER = "${serverContainerName}:${toString agentPort}"; WOODPECKER_MAX_PROCS = "2"; }; + extraOptions = [ "--network=woodpecker" ]; }; }