Docker compose to bring up a Prometheus server

0 votes
Can somebody provide me with a docker-compose file to bring up a Prometheus server on a Linux system?

Thanks in advanace!
Oct 23 in Docker by Hannah
• 16,300 points
140 views

1 answer to this question.

0 votes

I think this docker-compose should be helpful. Have a look at it:

version: '3'
networks:
  monitor-net:
    driver: bridge
volumes:
    prometheus_data: {}
services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    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=200h'
      - '--web.enable-lifecycle'
    # restart: unless-stopped
    expose:
      - 9090
    ports:
      - "9090:9090"
    networks:
      - monitor-net
answered Oct 23 by Eric

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,920 points
224 views
0 votes
1 answer