Created
November 29, 2018 02:46
-
-
Save NotSoSuper/91dcbf6352a4290456b5b81d4ffe6cc8 to your computer and use it in GitHub Desktop.
custom dockprom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.1' | |
services: | |
prometheus: | |
image: prom/prometheus:v2.5.0 | |
container_name: prometheus | |
volumes: | |
- ./prometheus/:/etc/prometheus/ | |
- ./data/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' | |
- '--storage.tsdb.retention=200h' | |
- '--web.enable-lifecycle' | |
restart: unless-stopped | |
expose: | |
- 9090 | |
network_mode: bridge | |
links: | |
- nodeexporter | |
- cadvisor | |
- pushgateway | |
- alertmanager | |
labels: | |
org.label-schema.group: "monitoring" | |
alertmanager: | |
image: prom/alertmanager:v0.15.3 | |
container_name: alertmanager | |
volumes: | |
- ./alertmanager/:/etc/alertmanager/ | |
command: | |
- '--config.file=/etc/alertmanager/config.yml' | |
- '--storage.path=/alertmanager' | |
restart: unless-stopped | |
expose: | |
- 9093 | |
network_mode: bridge | |
labels: | |
org.label-schema.group: "monitoring" | |
nodeexporter: | |
image: prom/node-exporter:v0.16.0 | |
container_name: nodeexporter | |
user: root | |
privileged: true | |
volumes: | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /:/rootfs:ro | |
command: | |
- '--path.procfs=/host/proc' | |
- '--path.sysfs=/host/sys' | |
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)' | |
restart: unless-stopped | |
expose: | |
- 9100 | |
network_mode: bridge | |
labels: | |
org.label-schema.group: "monitoring" | |
cadvisor: | |
image: google/cadvisor:v0.32.0 | |
container_name: cadvisor | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:rw | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux | |
restart: unless-stopped | |
expose: | |
- 8080 | |
network_mode: bridge | |
labels: | |
org.label-schema.group: "monitoring" | |
grafana: | |
image: grafana/grafana:5.3.4 | |
container_name: grafana | |
volumes: | |
- ./grafana/:/etc/grafana/ | |
- ./grafana/setup.sh:/setup.sh | |
- ./data/grafana/:/var/lib/grafana/ | |
entrypoint: /setup.sh | |
env_file: | |
- config | |
restart: unless-stopped | |
expose: | |
- 3000 | |
network_mode: bridge | |
links: | |
- prometheus | |
- alertmanager | |
labels: | |
org.label-schema.group: "monitoring" | |
pushgateway: | |
image: prom/pushgateway | |
container_name: pushgateway | |
restart: unless-stopped | |
expose: | |
- 9091 | |
network_mode: bridge | |
labels: | |
org.label-schema.group: "monitoring" | |
caddy: | |
image: stefanprodan/caddy | |
container_name: caddy | |
ports: | |
- "3000:3000" | |
- "9090:9090" | |
- "9093:9093" | |
- "9091:9091" | |
volumes: | |
- ./caddy/:/etc/caddy/ | |
environment: | |
- ADMIN_USER=${ADMIN_USER:-admin} | |
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin} | |
restart: unless-stopped | |
network_mode: bridge | |
links: | |
- prometheus | |
- alertmanager | |
- pushgateway | |
- grafana | |
labels: | |
org.label-schema.group: "monitoring" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment