-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-elk.yml
172 lines (161 loc) · 5.53 KB
/
docker-compose-elk.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: '3.8'
# 3.8 required for depends_on condition support, although not officially listed in https://docs.docker.com/compose/compose-file/compose-versioning/#version-38
services:
inproxy:
environment:
- LOG_FILE_LEVEL=INFO
- LOG_HOME=/var/log/govsso-inproxy
- ELASTIC_APM_ENABLED=true
- ELASTIC_APM_SERVER_URL=http://fleet-server:8200
- ELASTIC_APM_SERVICE_NAME=govsso-inproxy
- ELASTIC_APM_HOSTNAME=inproxy.localhost
- ELASTIC_APM_ENVIRONMENT=dev-local
- ELASTIC_APM_VERIFY_SERVER_CERT=false
- ELASTIC_APM_METRICS_INTERVAL=10s
- ELASTIC_APM_CLOUD_PROVIDER=NONE
- ELASTIC_APM_APPLICATION_PACKAGES=ee.ria.govsso.inproxy
- ELASTIC_APM_TRANSACTION_IGNORE_URLS=/actuator/*
labels:
- co.elastic.logs/enabled=true
user: root
volumes:
- govsso-inproxy-logs:/var/log/govsso-inproxy:rw
hydra:
entrypoint: sh -c 'sleep 7 && hydra migrate sql --read-from-env --yes && mkdir -p /var/log/govsso-hydra && chmod 750 /var/log/govsso-hydra && hydra serve --config /etc/govsso-hydra/config.yml all 2>&1 | tee -a /var/log/govsso-hydra/hydra-1.log'
environment:
- TRACING_PROVIDER=otel
- TRACING_PROVIDERS_OTLP_INSECURE=true
- TRACING_PROVIDERS_OTLP_SAMPLING_SAMPLING_RATIO=1.0
- TRACING_PROVIDERS_OTLP_SERVER_URL=fleet-server:8200
- TRACING_SERVICE_NAME=govsso-hydra
- OTEL_RESOURCE_ATTRIBUTES=deployment.environment=local,service.instance.id=hydra,service.version=2.1.2.1
labels:
- co.elastic.logs/enabled=true
user: root
volumes:
- govsso-hydra-logs:/var/log/govsso-hydra:rw
session:
environment:
- LOG_FILE_LEVEL=INFO
- LOG_HOME=/var/log/govsso-session
- ELASTIC_APM_ENABLED=true
- ELASTIC_APM_SERVER_URL=http://fleet-server:8200
- ELASTIC_APM_SERVICE_NAME=govsso-session
- ELASTIC_APM_HOSTNAME=session.localhost
- ELASTIC_APM_ENVIRONMENT=dev-local
- ELASTIC_APM_VERIFY_SERVER_CERT=false
- ELASTIC_APM_METRICS_INTERVAL=10s
- ELASTIC_APM_CLOUD_PROVIDER=NONE
- ELASTIC_APM_APPLICATION_PACKAGES=ee.ria.govsso.session
- ELASTIC_APM_TRANSACTION_IGNORE_URLS=/actuator/*
labels:
- co.elastic.logs/enabled=true
user: root
volumes:
- govsso-session-logs:/var/log/govsso-session:rw
admin:
environment:
- LOG_FILE_LEVEL=INFO
- LOG_HOME=/var/log/govsso-admin
labels:
- co.elastic.logs/enabled=true
user: root
volumes:
- govsso-admin-logs:/var/log/govsso-admin:rw
hydra-db:
labels:
- co.elastic.logs/enabled=true
- co.elastic.logs/module=postgresql
admin-db:
labels:
- co.elastic.logs/enabled=true
- co.elastic.logs/module=postgresql
enduserselfservice:
environment:
- LOG_FILE_LEVEL=INFO
- LOG_HOME=/var/log/govsso-enduserselfservice
- ELASTIC_APM_ENABLED=true
- ELASTIC_APM_SERVER_URL=http://fleet-server:8200
- ELASTIC_APM_SERVICE_NAME=govsso-enduserselfservice
- ELASTIC_APM_HOSTNAME=enduserselfservice.localhost
- ELASTIC_APM_ENVIRONMENT=dev-local
- ELASTIC_APM_VERIFY_SERVER_CERT=false
- ELASTIC_APM_METRICS_INTERVAL=10s
- ELASTIC_APM_CLOUD_PROVIDER=NONE
- ELASTIC_APM_APPLICATION_PACKAGES=ee.ria.govsso.enduserselfservice
- ELASTIC_APM_TRANSACTION_IGNORE_URLS=/actuator/*
labels:
- co.elastic.logs/enabled=true
user: root
volumes:
- govsso-enduserselfservice-logs:/var/log/govsso-enduserselfservice:rw
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.4
environment:
- ELASTICSEARCH_PASSWORD=changeme
- ES_JAVA_OPTS=-Xms1g -Xmx1g
- discovery.type=single-node
- xpack.security.enabled=true
volumes:
- ./local/elasticsearch/users:/usr/share/elasticsearch/config/users
- ./local/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles
healthcheck:
test: [
"CMD-SHELL",
"curl -s -f http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=10s",
]
interval: 10s
timeout: 10s
retries: 120
ports:
- '22200:9200'
restart: unless-stopped
kibana:
image: docker.elastic.co/kibana/kibana:8.10.4
volumes:
- ./local/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -f -I http://localhost:5601/api/status | grep -q 'HTTP/1.1 200 OK'",
]
interval: 10s
timeout: 10s
retries: 120
ports:
- '23601:5601'
restart: unless-stopped
fleet-server:
image: docker.elastic.co/beats/elastic-agent:8.10.4
ports:
- '24220:8220'
- '24200:8200'
user: root
environment:
- FLEET_SERVER_ENABLE=1
- FLEET_SERVER_POLICY_ID=fleet-server-apm-policy
- KIBANA_FLEET_SETUP=1
- KIBANA_FLEET_HOST=http://kibana:5601
- KIBANA_FLEET_USERNAME=admin
- KIBANA_FLEET_PASSWORD=changeme
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
elasticsearch: { condition: service_healthy }
kibana: { condition: service_healthy }
volumes:
govsso-admin-logs:
name: govsso-admin-logs
govsso-enduserselfservice-logs:
name: govsso-enduserselfservice-logs
govsso-hydra-logs:
name: govsso-hydra-logs
govsso-inproxy-logs:
name: govsso-inproxy-logs
govsso-session-logs:
name: govsso-session-logs