Skip to content

Commit

Permalink
refactor : Grafana, Loki, Prometheus 컨테이너 분리 (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjKim1229 committed Feb 14, 2025
1 parent 8d26159 commit 87b2a0e
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 36 deletions.
37 changes: 37 additions & 0 deletions docker-compose-monitory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
services:
prometheus:
container_name: prometheus
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- clubber

grafana:
image: grafana/grafana:latest
environment:
- GF_SERVER_HTTP_PORT=4000
container_name: grafana
ports:
- "4000:4000"
# volumes:
# - ./grafana:/var/lib/grafana
depends_on:
- prometheus
networks:
- clubber

loki:
container_name: loki
image: grafana/loki:latest
ports:
- "3100:3100"
volumes:
- ./loki-config.yml:/etc/loki/loki-config.yaml
command: -config.file=/etc/loki/loki-config.yaml -config.expand-env=true
networks:
- clubber
72 changes: 36 additions & 36 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,42 @@ services:
networks:
- clubber

prometheus:
container_name: prometheus
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- clubber

grafana:
image: grafana/grafana:latest
environment:
- GF_SERVER_HTTP_PORT=4000
container_name: grafana
ports:
- "4000:4000"
# volumes:
# - ./grafana:/var/lib/grafana
depends_on:
- prometheus
networks:
- clubber

loki:
container_name: loki
image: grafana/loki:latest
ports:
- "3100:3100"
volumes:
- ./loki-config.yml:/etc/loki/loki-config.yaml
command: -config.file=/etc/loki/loki-config.yaml -config.expand-env=true
networks:
- clubber
# prometheus:
# container_name: prometheus
# image: prom/prometheus:latest
# ports:
# - "9090:9090"
# volumes:
# - ./prometheus.yml:/etc/prometheus/prometheus.yml
# extra_hosts:
# - "host.docker.internal:host-gateway"
# networks:
# - clubber
#
# grafana:
# image: grafana/grafana:latest
# environment:
# - GF_SERVER_HTTP_PORT=4000
# container_name: grafana
# ports:
# - "4000:4000"
# # volumes:
# # - ./grafana:/var/lib/grafana
# depends_on:
# - prometheus
# networks:
# - clubber
#
# loki:
# container_name: loki
# image: grafana/loki:latest
# ports:
# - "3100:3100"
# volumes:
# - ./loki-config.yml:/etc/loki/loki-config.yaml
# command: -config.file=/etc/loki/loki-config.yaml -config.expand-env=true
# networks:
# - clubber

promtail:
container_name: promtail
Expand Down

0 comments on commit 87b2a0e

Please sign in to comment.