fix: use named volume for prometheus config, populate on remote host
Release / release (push) Successful in 29s
CI / test (push) Successful in 53s
CI / docker (push) Successful in 22s
CD / deploy (push) Failing after 10s

This commit is contained in:
zwitschi committed 2026-08-06 22:13:24 +02:00
1 parent 4c02ab9d55
commit 68bd241f2c
4 files changed
+32 -23

No files matched your search

+25 -20
View File
@@ -37,10 +37,14 @@ jobs:
NGINX_PORT=80
EOF
- name: Seed Prometheus config
- name: Seed Prometheus config on remote host
env:
DOCKER_HOST: tcp://192.168.88.40:2375
run: |
mkdir -p monitoring/prometheus
cat > monitoring/prometheus/prometheus.yml << 'EOF'
docker run --rm \
-v prometheus-config:/etc/prometheus \
alpine:latest sh -c '
cat > /etc/prometheus/prometheus.yml << "PROMEOF"
global:
scrape_interval: 15s
evaluation_interval: 15s
@@ -49,29 +53,29 @@ jobs:
- "/etc/prometheus/alerts.yml"
scrape_configs:
- job_name: 'chat'
- job_name: "chat"
static_configs:
- targets: ['chat:3000']
- job_name: 'playout'
- targets: ["chat:3000"]
- job_name: "playout"
static_configs:
- targets: ['playout:8081']
- job_name: 'nginx'
- targets: ["playout:8081"]
- job_name: "nginx"
static_configs:
- targets: ['nginx-exporter:9113']
- job_name: 'redis'
- targets: ["nginx-exporter:9113"]
- job_name: "redis"
static_configs:
- targets: ['redis-exporter:9121']
- job_name: 'postgres'
- targets: ["redis-exporter:9121"]
- job_name: "postgres"
static_configs:
- targets: ['postgres-exporter:9187']
- job_name: 'node'
- targets: ["postgres-exporter:9187"]
- job_name: "node"
static_configs:
- targets: ['node-exporter:9100']
- job_name: 'prometheus'
- targets: ["node-exporter:9100"]
- job_name: "prometheus"
static_configs:
- targets: ['localhost:9090']
EOF
cat > monitoring/prometheus/alerts.yml << 'EOF'
- targets: ["localhost:9090"]
PROMEOF
cat > /etc/prometheus/alerts.yml << "ALERTSEOF"
groups:
- name: linearvoid
rules:
@@ -117,7 +121,8 @@ jobs:
severity: warning
annotations:
summary: "Low disk space"
EOF
ALERTSEOF
'
- name: Deploy with docker-compose
env: