Untitled
unknown
plain_text
2 years ago
3.2 kB
11
Indexable
version: '3.8'
networks:
monitoring:
driver: bridge
volumes:
prometheus_data: {}
services:
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:rw
- /etc/os-release:/rootfs/etc/os-release:ro # Add this line
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- 9100:9100
networks:
- monitoring
name-generator-app:
build:
context: ./microservice
dockerfile: Dockerfile
container_name: name-generator-container
restart: unless-stopped
ports:
- 5000:5000
networks:
- monitoring
depends_on:
- stress-ng
prometheus:
image: prom/prometheus:latest
user: "1001"
environment:
- PUID=1001
- PGID=1001
container_name: prometheus
restart: unless-stopped
volumes:
- ~/Dissertation/promgrafnode/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ~/Dissertation/promgrafnode/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
networks:
- monitoring
grafana:
image: grafana/grafana:latest
user: "1001"
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
volumes:
- ~/Dissertation/promgrafnode/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ~/Dissertation/promgrafnode/grafana:/var/lib/grafana
networks:
- monitoring
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8081:8080
networks:
- monitoring
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- redis
redis:
image: redis:latest
container_name: redis
ports:
- 6379:6379
networks:
- monitoring
locust:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./locustfile.py:/mnt/locust/locustfile.py
ports:
- 8089:8089
networks:
- monitoring
depends_on:
- redis
publisher:
build:
context: .
dockerfile: Dockerfile
networks:
- monitoring
ports:
- 8080:5001 # Map container port 5000 to local machine port 5000
stress-ng:
image: alexeiled/stress-ng:latest
container_name: stress-ng
restart: unless-stopped
command:
- "stress"
- "--cpu"
- "1"
- "--timeout"
- "5s"
networks:
- monitoring
ports:
- 9000:9000Editor is loading...