version: '3.8'
services:
prometheus:
container_name: prom
image: prom/prometheus:latest
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention=1h'
- '--storage.tsdb.retention.size=1TB'
- '--storage.tsdb.wal-compression'
- '--web.enable-lifecycle'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
volumes:
- ../../config/prometheus-ec2/prometheus.yml:/etc/prometheus/prometheus.yml
- ./rules:/etc/prometheus/rules
ports:
- "9090:9090"
networks:
default:
external:
name: monitoring |