fix: use named volume for prometheus config, populate on remote host
This commit is contained in:
1 parent
4c02ab9d55
commit
68bd241f2c
4 files changed
+32
-23
No files matched your search
+25
-20
@@ -37,10 +37,14 @@ jobs:
|
|||||||
NGINX_PORT=80
|
NGINX_PORT=80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Seed Prometheus config
|
- name: Seed Prometheus config on remote host
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://192.168.88.40:2375
|
||||||
run: |
|
run: |
|
||||||
mkdir -p monitoring/prometheus
|
docker run --rm \
|
||||||
cat > monitoring/prometheus/prometheus.yml << 'EOF'
|
-v prometheus-config:/etc/prometheus \
|
||||||
|
alpine:latest sh -c '
|
||||||
|
cat > /etc/prometheus/prometheus.yml << "PROMEOF"
|
||||||
global:
|
global:
|
||||||
scrape_interval: 15s
|
scrape_interval: 15s
|
||||||
evaluation_interval: 15s
|
evaluation_interval: 15s
|
||||||
@@ -49,29 +53,29 @@ jobs:
|
|||||||
- "/etc/prometheus/alerts.yml"
|
- "/etc/prometheus/alerts.yml"
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'chat'
|
- job_name: "chat"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['chat:3000']
|
- targets: ["chat:3000"]
|
||||||
- job_name: 'playout'
|
- job_name: "playout"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['playout:8081']
|
- targets: ["playout:8081"]
|
||||||
- job_name: 'nginx'
|
- job_name: "nginx"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['nginx-exporter:9113']
|
- targets: ["nginx-exporter:9113"]
|
||||||
- job_name: 'redis'
|
- job_name: "redis"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['redis-exporter:9121']
|
- targets: ["redis-exporter:9121"]
|
||||||
- job_name: 'postgres'
|
- job_name: "postgres"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['postgres-exporter:9187']
|
- targets: ["postgres-exporter:9187"]
|
||||||
- job_name: 'node'
|
- job_name: "node"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['node-exporter:9100']
|
- targets: ["node-exporter:9100"]
|
||||||
- job_name: 'prometheus'
|
- job_name: "prometheus"
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ["localhost:9090"]
|
||||||
EOF
|
PROMEOF
|
||||||
cat > monitoring/prometheus/alerts.yml << 'EOF'
|
cat > /etc/prometheus/alerts.yml << "ALERTSEOF"
|
||||||
groups:
|
groups:
|
||||||
- name: linearvoid
|
- name: linearvoid
|
||||||
rules:
|
rules:
|
||||||
@@ -117,7 +121,8 @@ jobs:
|
|||||||
severity: warning
|
severity: warning
|
||||||
annotations:
|
annotations:
|
||||||
summary: "Low disk space"
|
summary: "Low disk space"
|
||||||
EOF
|
ALERTSEOF
|
||||||
|
'
|
||||||
|
|
||||||
- name: Deploy with docker-compose
|
- name: Deploy with docker-compose
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
- **Tag format**: Standardized on `*.*.*` (e.g. `1.0.9`), removed `v` prefix from existing tags.
|
- **Tag format**: Standardized on `*.*.*` (e.g. `1.0.9`), removed `v` prefix from existing tags.
|
||||||
- **DEPLOYMENT.md**: Documented parallel CI/CD pipeline flow with workflow table.
|
- **DEPLOYMENT.md**: Documented parallel CI/CD pipeline flow with workflow table.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Prometheus config mount**: Switched prod from bind mounts to named volume `prometheus-config`, populated via `docker run` on remote host. Fixes `not a directory` error when bind source path doesn't exist on deployment host.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- `.github/MEMORY.md`, `.github/agents/`, `.github/instructions/` — tracking files migrated out of repo.
|
- `.github/MEMORY.md`, `.github/agents/`, `.github/instructions/` — tracking files migrated out of repo.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
[](https://git.allucanget.biz/zwitschi/linearvoid/actions)
|
[](https://git.allucanget.biz/zwitschi/linearvoid/actions)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://git.allucanget.biz)
|
[](https://git.allucanget.biz)
|
||||||
[](https://git.allucanget.biz/zwitschi/linearvoid/releases)
|
[](https://git.allucanget.biz/zwitschi/linearvoid/releases)
|
||||||
[](CHANGELOG.md)
|
[](CHANGELOG.md)
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|||||||
@@ -159,8 +159,7 @@ services:
|
|||||||
container_name: linearvoid-prometheus
|
container_name: linearvoid-prometheus
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
- prometheus-config:/etc/prometheus
|
||||||
- ./monitoring/prometheus/alerts.yml:/etc/prometheus/alerts.yml
|
|
||||||
- prometheus-data:/prometheus
|
- prometheus-data:/prometheus
|
||||||
ports:
|
ports:
|
||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
@@ -199,5 +198,6 @@ networks:
|
|||||||
volumes:
|
volumes:
|
||||||
redis-data:
|
redis-data:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
prometheus-config:
|
||||||
prometheus-data:
|
prometheus-data:
|
||||||
grafana-data:
|
grafana-data:
|
||||||
Reference in new issue
Block a user