Commit f63abd0f authored by llitfkitfk's avatar llitfkitfk
Browse files

add git repo source

parent 502a8ae2
......@@ -3,6 +3,8 @@ version: '3.1'
volumes:
prometheus_data: {}
grafana_data: {}
prometheus_config_data: {}
alertmanager_config_data: {}
networks:
front-tier:
......@@ -13,7 +15,7 @@ services:
prometheus:
image: prom/prometheus:v2.0.0
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_config_data:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
......@@ -33,7 +35,7 @@ services:
deploy:
placement:
constraints:
- node.hostname == moby
- node.hostname == ${HOSTNAME}
node-exporter:
image: prom/node-exporter
......@@ -59,7 +61,7 @@ services:
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
- alertmanager_config_data:/etc/alertmanager/
networks:
- back-tier
restart: always
......@@ -69,7 +71,7 @@ services:
deploy:
placement:
constraints:
- node.hostname == moby
- node.hostname == ${HOSTNAME}
cadvisor:
image: google/cadvisor
volumes:
......@@ -84,7 +86,15 @@ services:
restart: always
deploy:
mode: global
source:
image: containerize/git
environment:
- REPO_LOCAL=/data/repos/prometheus
- REPO_REMOTE=https://github.com/vegasbrianc/prometheus.git
tty: true
volumes:
- prometheus_config_data:/data/git/repos/prometheus/prometheus
- alertmanager_config_data:/data/git/repos/prometheus/alertmanager
grafana:
image: grafana/grafana
depends_on:
......@@ -93,8 +103,9 @@ services:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
env_file:
- config.monitoring
environment:
- GF_SECURITY_ADMIN_PASSWORD=foobar
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- back-tier
- front-tier
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment