Skip to content

Commit

Permalink
Add grafana provisioning configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Jul 28, 2023
1 parent 1fa47e4 commit 11f96b8
Show file tree
Hide file tree
Showing 6 changed files with 435 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ ex_turn-*.tar
/tmp/

.elixir_ls/

/grafana_data
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN mix release

FROM alpine:3.18.0 as app

WORKDIR /app

RUN apk add --no-cache --update libncursesw openssl libstdc++

WORKDIR /app

COPY --from=build /app/_build/prod/rel/ex_turn ./

CMD ["bin/ex_turn", "start"]
23 changes: 17 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,37 @@ version: '3.2'
services:
ex_turn:
build: .
network_mode: "host"
container_name: ex_turn
restart: unless_stopped
network_mode: host

prometheus:
image: "prom/prometheus:v2.46.0"
image: prom/prometheus:v2.46.0
container_name: prometheus
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
- host.docker.internal:host-gateway
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
depends_on:
- ex_turn

grafana:
image: "grafana/grafana:10.0.3"
image: grafana/grafana:10.0.3
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
- 3000:3000
volumes:
- "./grafana_data:/var/lib/grafana"
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning
depends_on:
- prometheus

volumes:
grafana_data: {}
prometheus_data: {}
10 changes: 10 additions & 0 deletions grafana/provisioning/dashboards/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: 1

providers:
- name: 'TURN Stats'
orgId: 1
folder: ''
type: file
updateIntervalSeconds: 10
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit 11f96b8

Please sign in to comment.