Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
version: '3'
services:

my-app:
image: devental/containers-monitoring-app
image: containers-monitoring-app
container_name: my-python-container
restart: always
environment:
- DOCKER_HOST=tcp://host.docker.internal:2375
depends_on:
- prometheus

prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- D:/ContainerMonitoringProgram/container-monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
restart: always
Expand All @@ -34,10 +38,14 @@ services:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
- "3001:3000"
volumes:
- grafana-data:/var/lib/grafana
env_file:
- D:/ContainerMonitoringProgram/container-monitoring/.env

restart: always

volumes:
grafana-data:
grafana-data:

7 changes: 5 additions & 2 deletions prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
global:
scrape_interval: 10s
scrape_interval: 5s

scrape_configs:
- job_name: "docker"
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']