-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-develop.yml
157 lines (148 loc) · 4.89 KB
/
docker-compose-develop.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: '3.9'
services:
# PostgreSQL database for persistent data storage
postgres:
image: "postgres"
container_name: "postgres-develop"
hostname: "postgres-develop"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
# 5432 on the container is mapped to 5432 on the server/VM/your Machine.
- "5432:5432"
volumes:
- database-data:/var/lib/postgresql/data/ # Persist data even if container shuts down
elasticsearch:
container_name: "elasticsearch-develop"
hostname: "elasticsearch-develop"
build:
context: Observability/elasticsearch/
args:
ELK_VERSION: ${ELK_VERSION}
environment:
xpack.security.enabled: "true"
xpack.monitoring.collection.enabled: "true"
ELASTIC_USER: ${ELASTIC_USER}
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
volumes:
- type: bind
source: ./Observability/elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
restart: always
logstash:
container_name: "logstash-develop"
hostname: "logstash-develop"
build:
context: Observability/logstash/
args:
ELK_VERSION: ${ELK_VERSION}
volumes:
- type: bind
source: ./Observability/logstash/config/logstash.yml
target: /usr/share/logstash/config/logstash.yml
- type: bind
source: ./Observability/logstash/pipeline
target: /usr/share/logstash/pipeline
ports:
- "31311:31311" # For HTTP connection
- "5044:5044"
- "5000:5000/tcp"
- "5000:5000/udp"
- "9600:9600"
environment:
xpack.monitoring.enabled: "true"
xpack.monitoring.elasticsearch.hosts: '["http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]'
xpack.monitoring.elasticsearch.username: ${ELASTIC_USER}
xpack.monitoring.elasticsearch.password: ${ELASTIC_PASSWORD}
ELASTICSEARCH_HOST: ${ELASTICSEARCH_HOST}
ELASTICSEARCH_PORT: ${ELASTICSEARCH_PORT}
ELASTICSEARCH_USER: ${ELASTIC_USER}
ELASTICSEARCH_PASSWORD: ${ELASTIC_PASSWORD}
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
restart: always
depends_on:
- elasticsearch
kibana:
container_name: "kibana-develop"
hostname: "kibana-develop"
build:
context: Observability/kibana/
args:
ELK_VERSION: ${ELK_VERSION}
environment:
ELASTICSEARCH_HOSTS: '["http://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]'
ELASTICSEARCH_USERNAME: ${ELASTIC_USER}
ELASTICSEARCH_PASSWORD: ${ELASTIC_PASSWORD}
volumes:
- type: bind
source: ./Observability/kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
ports:
- "5601:5601"
restart: always
depends_on:
- elasticsearch
prometheus:
image: "prom/prometheus"
container_name: "prometheus-develop"
hostname: "prometheus-develop"
ports:
- "9090:9090"
volumes:
- ./Observability/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
grafana:
image: "grafana/grafana"
container_name: "grafana-develop"
hostname: "grafana-develop"
user: "472"
ports:
# Expose on host port 4000 as 3000 is used for the frontend
- "4000:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./Observability/grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./Observability/grafana/config.monitoring
restart: always
depends_on:
- prometheus
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector-develop
command: ["--config=/etc/config.yml"]
volumes:
- ./Observability/otel-collector/collector-config.yml:/etc/config.yml
ports:
# Expose on host port 4317
- 4317:4317
depends_on: [jaeger]
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger-develop
ports:
# Expose on host port 16686
- 16686:16686
volumes:
database-data: # Volume for PostgreSQL
elasticsearch: # Volume for ElasticSearch
prometheus_data: # Volume for Prometheus
grafana_data: # Volume for Grafana