From 638f34c2d387e959c555bd9157aec36ec47fa49f Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Thu, 10 Jul 2025 15:35:54 -0700 Subject: [PATCH] [goatcounter] Adds instance for blazestar.net --- system/hosts/mcp/containers/goatcounter.nix | 27 +++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/system/hosts/mcp/containers/goatcounter.nix b/system/hosts/mcp/containers/goatcounter.nix index af90eac..c7bb998 100644 --- a/system/hosts/mcp/containers/goatcounter.nix +++ b/system/hosts/mcp/containers/goatcounter.nix @@ -1,9 +1,14 @@ { config, ... }: let - inherit (import ./lib.nix config) mkContainer terakoda hostRule; + inherit (import ./lib.nix config) + mkContainer + terakoda + blazestar + hostRule + ; in { - virtualisation.oci-containers.containers.goatcounter = mkContainer { + virtualisation.oci-containers.containers.goatcounter-terakoda = mkContainer { image = "arp242/goatcounter"; hostName = "goatcounter"; domain = terakoda; @@ -21,4 +26,22 @@ in "traefik.http.routers.www-terakoda-com-goatcounter.service" = "goatcounter"; }; }; + virtualisation.oci-containers.containers.goatcounter-blazestar = mkContainer { + image = "arp242/goatcounter"; + hostName = "goatcounter"; + domain = blazestar; + public = true; + port = 8080; + volumes = [ + "goatcounter-data:/home/goatcounter/goatcounter-data" + ]; + extraLabels = { + # "traefik.http.middlewares.strip-analytics.stripprefix.prefixes" = "/analytics"; + # "traefik.http.routers.www-blazestar-net-goatcounter.middlewares" = "strip-analytics"; + # Host the script on www.blazestar.net so that it is easy to fetch + "traefik.http.routers.www-blazestar-net-goatcounter.rule" = + "PathPrefix(`/count`) && ${hostRule "www" blazestar}"; + "traefik.http.routers.www-blazestar-net-goatcounter.service" = "goatcounter"; + }; + }; }