-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (109 loc) · 2.77 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
version: '3.7'
services:
backend:
build: backend
container_name: petka-backend
environment:
- JVM_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9000
- ENV=default
- DB_URL=jdbc:mysql://petka-mariadb:3306/petka?useSSL=false
- DB_USERNAME=petka
- DB_PASSWORD=petka
- RABBITMQ_HOST=petka-rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=guest
- RABBITMQ_PASSWORD=guest
- REDIS_HOST=petka-redis
- REDIS_PORT=6379
ports:
- '8080:8080'
- '9000:9000'
depends_on:
- database
- rabbitmq
- redis
database:
image: petka-mariadb
build: database
container_name: petka-mariadb
ports:
- '3306:3306'
rabbitmq:
image: petka-rabbitmq
build: rabbitmq
container_name: petka-rabbitmq
ports:
- "5672:5672"
- "15672:15672"
redis:
image: petka-redis
build: redis
container_name: petka-redis
ports:
- '6379:6379'
# https://medium.com/@karthi.net/how-to-aggregate-docker-container-logs-and-analyse-with-elk-stack-fb88cf5a98a4:
logspout:
image: gliderlabs/logspout:v3.2.6
command: 'syslog://logstash:5000'
links:
- logstash
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
depends_on:
- elasticsearch
- logstash
- kibana
# https://blog.jhink.com/centralize-docker-logs-using-elastic-stack-e55670bfb714
logstash:
image: logstash:7.4.0
environment:
- STDOUT=true
links:
- elasticsearch
volumes:
- "./elk/logstash.conf:/config-dir/logstash.conf"
ports:
- '5000:5000'
depends_on:
- elasticsearch
- kibana
command: logstash -f /config-dir/logstash.conf
kibana:
image: kibana:7.4.0
links:
- elasticsearch
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
ports:
- '5601:5601'
depends_on:
- elasticsearch
elasticsearch:
image: elasticsearch:7.4.0
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ports:
- '9200:9200'
- '9300:9300'
# https://dimitr.im/monitoring-spring-prometheus-grafana
# https://stackoverflow.com/questions/56826360/docker-compose-opening-storage-failed-permission-denied-error-on-running
grafana:
image: grafana/grafana:6.4.3
ports:
- 3000:3000
user: "1000"
volumes:
- ./grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=adminadmin
prometheus:
container_name: prometheus
image: prom/prometheus:v2.13.1
ports:
- 9090:9090
volumes:
- ./grafana/prometheus.yml:/etc/prometheus/prometheus.yml:ro
command:
- --config.file=/etc/prometheus/prometheus.yml