-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-stack.yml
106 lines (96 loc) · 2.2 KB
/
docker-stack.yml
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
105
106
version: '3.3'
volumes:
minitwit_db: {}
grafana_data: {}
elk_elasticsearch_data:
services:
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8888:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
db:
image: antonfolkmann/minitwitdb:latest
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_DB: minitwit
env_file:
- .env
volumes:
- minitwit_db:/var/lib/postgresql/data
deploy:
replicas: 1
web:
image: toffernator/minitwit:latest
depends_on:
- db
- grafana
- prometheus
environment:
POSTGRES_USER: postgres
POSTGRES_DB: minitwit
env_file:
- .env
ports:
- 8080:8080
- 8081:8081
deploy:
replicas: 10
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
deploy:
placement:
constraints: [node.role == manager]
grafana:
image: grafana/grafana:4.5.2
volumes:
- grafana_data:/var/lib/grafana
ports:
- "3000:3000"
deploy:
placement:
constraints: [node.role == manager]
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.2.0"
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "discovery.type=single-node"
volumes:
- elk_elasticsearch_data:/usr/share/elasticsearch/data
ports:
- 9200:9200
deploy:
placement:
constraints: [node.role == manager]
resources:
reservations:
memory: 1g
replicas: 1
kibana:
image: "docker.elastic.co/kibana/kibana:7.2.0"
environment:
elasticsearch.hosts: '["http://minitwit_elasticsearch:9200"]'
ports:
- "5601:5601"
deploy:
placement:
constraints: [node.role == manager]
replicas: 1
filebeat:
image: "docker.elastic.co/beats/filebeat:7.2.0"
user: root
volumes:
- /root/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/lib/docker:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global