Skip to content

Commit 80aef2e

Browse files
committed
reafctoring log_and_metric
1 parent 2163e41 commit 80aef2e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

log_and_metric/.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ GF_ADMIN_PASSWORD=your_password
33
GRAFANA_URL="http://localhost:3000"
44
PROMETHEUS_URL="http://localhost:9090"
55
LOKI_URL="http://localhost:3100"
6+
LOKI_PORT="3100"
7+
GF_PORT="3000"
8+
PROMETHEUS_PORT="9090"
9+
PUSHGATEWAY_PORT="9091"

log_and_metric/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version: '3'
1+
version: '3.8'
22

33
services:
44
pushgateway:
55
image: prom/pushgateway:v1.11.1
66
ports:
7-
- "9091:9091"
7+
- "${PUSHGATEWAY_PORT}:${PUSHGATEWAY_PORT}"
88
restart: unless-stopped
99
prometheus:
1010
image: prom/prometheus:latest
@@ -15,7 +15,7 @@ services:
1515
command:
1616
- '--config.file=/etc/prometheus/prometheus.yml'
1717
ports:
18-
- "9090:9090"
18+
- "${PROMETHEUS_PORT}:${PROMETHEUS_PORT}"
1919
depends_on:
2020
- pushgateway
2121

@@ -25,15 +25,15 @@ services:
2525
user: root
2626
restart: unless-stopped
2727
ports:
28-
- "3100:3100"
28+
- "${LOKI_PORT}:${LOKI_PORT}"
2929
command: -config.file=/etc/loki/local-config.yaml
3030

3131
grafana:
3232
image: grafana/grafana:12.0.2
3333
container_name: grafana
3434
restart: unless-stopped
3535
ports:
36-
- "3000:3000"
36+
- "${GF_PORT}:${GF_PORT}"
3737
volumes:
3838
- grafana-storage:/var/lib/grafana
3939
- ./grafana/provisioning:/etc/grafana/provisioning

0 commit comments

Comments
 (0)