Skip to content

Commit af5305d

Browse files
Convert the monitor db vars to env vars
1 parent fddeb7f commit af5305d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

grafana/provisioning/datasources/datasource.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ datasources:
5454
jsonData:
5555
global_queries: []
5656

57-
- name: pg_auto_failover Monitor (host port)
57+
- name: pg_auto_failover Monitor
5858
type: postgres
5959
uid: pgaf_monitor_host
6060
access: proxy
6161
orgId: 1
62-
url: host.docker.internal:5436
63-
database: pg_auto_failover
64-
user: autoctl_node
62+
url: "${MONITOR_DB_HOST}:${MONITOR_DB_PORT}"
63+
database: MONITOR_DB_DB
64+
user: MONITOR_DB_USER
6565
basicAuth: false
6666
isDefault: false
6767
editable: true

metrics-docker-compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ services:
2828
- POSTGRES_USER=postgres
2929
- POSTGRES_PASSWORD=postgres
3030
- PROMETHEUS_URL=http://prometheus:9090
31+
- MONITOR_DB_HOST=host.docker.internal
32+
- MONITOR_DB_PORT=5436
33+
- MONITOR_DB_DB=pg_auto_failover
34+
- MONITOR_DB_USER=autoctl_node
3135
extra_hosts:
3236
- "host.docker.internal:host-gateway"
3337
restart: unless-stopped

0 commit comments

Comments
 (0)