forked from cirobatista1980/Observabilidade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
135 lines (125 loc) · 3.52 KB
/
docker-compose.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3.4'
# Referencia
# https://github.com/elastic/stack-docker/blob/master/docker-compose.yml
# docker-compose -f docker-compose.yml up -d --build
# docker rmi $(docker images -q)
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
volumes:
- ./elastic:/usr/share/elasticsearch/data
container_name: elasticsearch
ports:
- "9200:9200"
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
kibana:
image: docker.elastic.co/kibana/kibana:7.9.3
container_name: kibana
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_URL=http://localhost:9200
depends_on:
- elasticsearch
apm-server:
image: docker.elastic.co/apm/apm-server:7.9.3
container_name: apm-server
ports:
- "8200:8200"
- "8201:8200"
environment:
- output.elasticsearch.hosts=['http://elasticsearch:9200']
- apm-server.host="0.0.0.0:8200"
- setup.kibana.host="kibana:5601"
depends_on:
- elasticsearch
pagamento.api:
container_name: pagamento-api
image: pagamento-api
ports:
- "5002:80"
- "5003:443"
build:
context: .
dockerfile: src/Pagamento.Api/Dockerfile
depends_on:
- nosql.server
- elasticsearch
venda.api:
container_name: venda-api
image: venda-api
ports:
- "5004:80"
- "5005:443"
build:
context: .
dockerfile: src/Venda.Api/Dockerfile
depends_on:
- nosql.server
- elasticsearch
estoque.api:
container_name: estoque-api
image: estoque-api
ports:
- "5000:80"
- "5001:443"
build:
context: .
dockerfile: src/Estoque.Api/Dockerfile
depends_on:
- nosql.server
- elasticsearch
nosql.server:
container_name: nosql.server
image: mongo
ports:
- "17017:27017"
heartbeat:
image: docker.elastic.co/beats/heartbeat:7.9.3
container_name: heartbeat
command: --strict.perms=false -e # -e flag to log to stderr and disable syslog/file output
secrets:
- source: heartbeat.yml
target: /usr/share/heartbeat/heartbeat.yml
volumes:
- './scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro'
depends_on: ['elasticsearch', 'kibana']
healthcheck:
test: heartbeat test config
interval: 30s
timeout: 15s
retries: 5
metricbeat:
image: docker.elastic.co/beats/metricbeat:7.9.3
container_name: metricbeat
# The commented sections below enable Metricbeat to monitor the Docker host,
# rather than the Metricbeat container. It's problematic with Docker for
# Windows, however, since "/proc", "/sys" etc. don't exist on Windows.
# The same likely applies to OSX (needs testing).
# volumes:
# - /proc:/hostfs/proc:ro
# - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
# - /:/hostfs:ro
command: --strict.perms=false -e # -e flag to log to stderr and disable syslog/file output
secrets:
- source: metricbeat.yml
target: /usr/share/metricbeat/metricbeat.yml
volumes:
- /proc:/hostfs/proc:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
- /:/hostfs:ro
- './scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro'
depends_on: ['elasticsearch', 'kibana']
healthcheck:
test: metricbeat test config
interval: 30s
timeout: 15s
retries: 5
secrets:
heartbeat.yml:
file: ./heartbeat.yml
metricbeat.yml:
file: ./metricbeat.yml