From 47ad45444abbe74f01f1ad56827f69024c5c72ee Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 27 Nov 2022 17:59:57 +0100 Subject: [PATCH] cloudflared: Add extra_hosts --- container/webserver/default.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/container/webserver/default.nix b/container/webserver/default.nix index 4200187..d78835b 100644 --- a/container/webserver/default.nix +++ b/container/webserver/default.nix @@ -5,6 +5,21 @@ in { virtualisation.arion.projects.webserver.settings = { services = { + cloudflared = { + service = { + image = "cloudflare/cloudflared:latest"; + container_name = "cloudflared"; + restart = "unless-stopped"; + command = [ "tunnel" "--no-autoupdate" "run" "--token" secret.container.webserver.cloudflared.config.token ]; + extra_hosts = [ + "host.docker.internal:host-gateway" + ]; + labels = { + "com.centurylinklabs.watchtower.enable" = "true"; + }; + }; + }; + mosquitto = { service = { image = "eclipse-mosquitto:2"; @@ -21,18 +36,6 @@ in }; }; - cloudflared = { - service = { - image = "cloudflare/cloudflared:latest"; - container_name = "cloudflared"; - restart = "unless-stopped"; - command = [ "tunnel" "--no-autoupdate" "run" "--token" secret.container.webserver.cloudflared.config.token ]; - labels = { - "com.centurylinklabs.watchtower.enable" = "true"; - }; - }; - }; - nifoc-pw-docs = { service = { image = "ghcr.io/nifoc/nifoc.pw-docs:master";