-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
104 lines (96 loc) · 2.56 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.7"
services:
graphite:
image: graphiteapp/graphite-statsd:1.1.10-4
volumes:
- "./graphite_conf/statsd.config.js:/opt/statsd/config/udp.js:ro"
- "./graphite_conf/statsd.config.js:/opt/statsd/config/tcp.js:ro"
- "./graphite_conf/graphite.blacklist.conf:/opt/graphite/conf/blacklist.conf:ro"
- "./graphite_conf/graphite.carbon.conf:/opt/graphite/conf/carbon.conf:ro"
- "./graphite_conf/graphite.storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf:ro"
- "./graphite:/opt/graphite/storage/:rw"
ports:
- "8080:8080"
- "8125:8125/udp"
deploy:
placement:
constraints:
- node.role == manager
grafana:
image: efoppiano/grafana:0.1
ports:
- "8081:3000"
volumes:
- "grafana_config:/var/lib/grafana"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
- GF_LOG_FILTERS=rendering:debug
depends_on:
- graphite
deploy:
placement:
constraints:
- node.role == manager
renderer:
image: grafana/grafana-image-renderer:latest
ports:
- "8082:8081"
deploy:
placement:
constraints:
- node.role == manager
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.0
command: >
-storage_driver="statsd"
-storage_driver_host="graphite:8125"
-storage_driver_db="cadvisor"
-storage_driver_buffer_duration="1m0s"
--enable_metrics=cpu,cpuLoad,disk,diskIO,memory,network
depends_on:
- graphite
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:rw"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
ports:
- "8888:8080"
deploy:
mode: global
resources:
limits:
memory: 128M
reservations:
memory: 64M
app:
image: http_js
command: sh -c "sleep 10 && npm start"
volumes:
- ".env:/opt/app/.env:ro"
ports:
- "9999:${APP_PORT}"
deploy:
restart_policy:
condition: none
postgres:
image: postgres:12
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./data/postgres_data:/var/lib/postgresql/data
deploy:
restart_policy:
condition: none
volumes:
grafana_config:
external: true
networks:
default:
attachable: true