version: '3.8'

services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    ports:
      - "3034:9090"  # Expose Prometheus on port 3034
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    networks:
      - monitoring_network

  node_exporter:
    image: prom/node-exporter
    container_name: node_exporter
    ports:
      - "9100:9100"  # Expose Node Exporter on port 9100
    networks:
      - monitoring_network

  apache_exporter:
    image: prom/apache-exporter
    container_name: apache_exporter
    ports:
      - "8082:9117"  # Expose Apache Exporter on port 8080
    environment:
      - APACHE_URL=http://your_apache_container:80/server-status?auto  # Change to your Apache endpoint
    networks:
      - monitoring_network

networks:
  monitoring_network:
    driver: bridge
