Skip to content

Instantly share code, notes, and snippets.

@moosh3
Created April 10, 2019 02:29
Show Gist options
  • Save moosh3/2252eaa49ec53fd90926e82c14bb36e0 to your computer and use it in GitHub Desktop.
Save moosh3/2252eaa49ec53fd90926e82c14bb36e0 to your computer and use it in GitHub Desktop.
version: '3.3'
services:
prometheus:
container_name: prometheus
image: prom/prometheus:v2.7.2
container_name: prometheus
- '--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.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
logging:
driver: none
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
expose:
- 9090
networks:
- monitor-net
extra_hosts:
- "services2:172.24.16.137"
labels:
com.integracredit.service: "monitoring"
alertmanager:
container_name: alertmanager
image: prom/alertmanager:v0.16.1
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/alertmanager'
restart: unless-stopped
logging:
driver: none
volumes:
- ./alertmanager/:/etc/alertmanager/
expose:
- 9093
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
blackbox:
container_name: blackbox_exporter
image: prom/black-box
command: --config.file=/config/blackbox.yml
restart: unless-stopped
logging:
driver: none
volumes:
- `pwd`:/config
ports:
- 9115:9115
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
nodeexporter:
container_name: node_exporter
image: prom/node-exporter:v0.17.0
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
logging:
driver: none
user: root
privileged: true
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
expose:
- 9100
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
cadvisor:
container_name: cadvisor
image: google/cadvisor:v0.33.0
restart: unless-stopped
logging:
driver: none
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
expose:
- 8080
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
grafana:
container_name: grafana
image: grafana/grafana:6.0.0
entrypoint: ["/setup.sh"]
restart: unless-stopped
logging:
driver: none
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/datasources:/etc/grafana/datasources
- ./grafana/dashboards:/etc/grafana/dashboards
- ./grafana/setup.sh:/setup.sh
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=true
expose:
- 3000
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
pushgateway:
image: prom/pushgateway:v0.7.0
container_name: pushgateway
restart: unless-stopped
expose:
- 9091
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
caddy:
image: stefanprodan/caddy
container_name: caddy
restart: unless-stopped
ports:
- "3000:3000"
- "9090:9090"
- "9093:9093"
- "9091:9091"
volumes:
- ./caddy/:/etc/caddy/
environment:
- ADMIN_USER=${ADMIN_USER:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
networks:
- monitor-net
labels:
com.integracredit.service: "monitoring"
volumes:
prometheus_data: {}
grafana_data: {}
networks:
monitor-net:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment