Skip to content

Commit

Permalink
feat(infra): add docker-compose setup with Prometheus and Grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
B3ns44d committed Sep 15, 2024
1 parent ad80718 commit daaa79b
Show file tree
Hide file tree
Showing 5 changed files with 1,925 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
services:
exporter:
build:
context: ./exporter
dockerfile: Dockerfile
container_name: gbfs-exporter
restart: unless-stopped
env_file:
- .env
command: >
--config /src/configs/providers.yaml
--port 8000
volumes:
- ./exporter/configs/providers.yaml:/src/configs/providers.yaml
ports:
- "8000:8000"
networks:
- monitoring
depends_on:
- prometheus

prometheus:
image: prom/prometheus:v2.45.0
container_name: prometheus
restart: unless-stopped
command:
- --config.file=/etc/prometheus/prometheus.yml
- --web.enable-admin-api
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
ports:
- "9090:9090"
networks:
- monitoring

grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
ports:
- "3000:3000"
networks:
- monitoring
depends_on:
- prometheus

networks:
monitoring:
driver: bridge

volumes:
prometheus_data:
driver: local
grafana_data:
driver: local
Loading

0 comments on commit daaa79b

Please sign in to comment.