Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ramesh-lingappan/d8b0e08ccbef4e5d8805f1e22f484e76 to your computer and use it in GitHub Desktop.
Save ramesh-lingappan/d8b0e08ccbef4e5d8805f1e22f484e76 to your computer and use it in GitHub Desktop.
PushGateway docker compose file
version: '3'
networks:
monitor-net:
driver: bridge
volumes:
prometheus_data: {}
pushgateway_data: {}
services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/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'
- '--storage.tsdb.retention=1h'
- '--web.enable-lifecycle'
expose:
- 9090
ports:
- "9090:9090"
networks:
- monitor-net
pushgateway:
image: prom/pushgateway:v1.0.1
volumes:
- pushgateway_data:/data
command:
- --persistence.file=/data/pushgateway.data
- --persistence.interval=1h
expose:
- 9091
ports:
- "9091:9091"
networks:
- monitor-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment