mirror of
https://github.com/Smaug123/PulumiConfig
synced 2025-10-05 08:38:41 +00:00
Fix Prometheus and Woodpecker (#17)
This commit is contained in:
@@ -33,6 +33,7 @@ in {
|
||||
services.miniflux-config.domain = userConfig.domain;
|
||||
services.woodpecker-config.domain = userConfig.domain;
|
||||
services.grafana-config.domain = userConfig.domain;
|
||||
services.prometheus-config.domain-exporter-domains = [userConfig.domain];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
|
@@ -16,13 +16,21 @@
|
||||
description = lib.mdDoc "Localhost port for node exporter";
|
||||
default = 9003;
|
||||
};
|
||||
domain-exporter-domains = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = lib.mdDoc "Paths to be interpolated into the domain-exporter config.";
|
||||
example = "example.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# For the domain exporter
|
||||
environment.etc."domain-exporter/domains.yaml" = {
|
||||
source = builtins.replaceStrings ["%%DOMAINS%%"] ["patrickstevens.co.uk"] ./domains.yaml;
|
||||
text = let
|
||||
interp = builtins.concatStringsSep "\", \"" config.services.prometheus-config.domain-exporter-domains;
|
||||
in
|
||||
builtins.replaceStrings ["%%DOMAINS%%"] [interp] (builtins.readFile ./domains.yaml);
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
|
@@ -3,7 +3,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
woodpecker-server:
|
||||
image: woodpeckerci/woodpecker-server:latest
|
||||
image: woodpeckerci/woodpecker-server:next
|
||||
ports: ["%%WOODPECKER_PORT%%:8000"]
|
||||
volumes:
|
||||
- woodpecker-server-data:/var/lib/woodpecker
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- WOODPECKER_AGENT_SECRET=${WOODPECKER_AGENT_SECRET}
|
||||
|
||||
woodpecker-agent:
|
||||
image: woodpeckerci/woodpecker-agent:latest
|
||||
image: woodpeckerci/woodpecker-agent:next
|
||||
command: agent
|
||||
restart: always
|
||||
depends_on: [woodpecker-server]
|
||||
|
3
PulumiWebServer/Nix/woodpecker/stop.sh
Normal file
3
PulumiWebServer/Nix/woodpecker/stop.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
"$DOCKER" compose -f "/etc/woodpecker.yaml" down
|
@@ -44,6 +44,7 @@
|
||||
wantedBy = ["multi-user.target"];
|
||||
path = [pkgs.docker];
|
||||
script = builtins.readFile ./start.sh;
|
||||
preStop = builtins.readFile ./stop.sh;
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
Type = "exec";
|
||||
|
@@ -46,6 +46,7 @@
|
||||
<Content Include="Nix\woodpecker\compose.yaml" />
|
||||
<Content Include="Nix\woodpecker\start.sh" />
|
||||
<Content Include="Nix\woodpecker\woodpecker.nix" />
|
||||
<Content Include="Nix\woodpecker\stop.sh" />
|
||||
<Content Include="Nix\grafana\grafana.nix" />
|
||||
<Content Include="Nix\grafana\node.json" />
|
||||
<Content Include="Nix\prometheus\prometheus.nix" />
|
||||
|
Reference in New Issue
Block a user