-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.yml
170 lines (164 loc) · 4.4 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
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
version: "2.4"
services:
app:
build:
context: app
dockerfile: dockers/dev.Dockerfile
volumes:
# For host/container sync and hot reload
- ./app/leek/api:/opt/app/leek/api
environment:
# General
- LEEK_API_LOG_LEVEL=WARNING
- LEEK_AGENT_LOG_LEVEL=INFO
# Components
- LEEK_ENABLE_API=true
- LEEK_ENABLE_AGENT=true
- LEEK_ENABLE_WEB=false
# URLs
- LEEK_API_URL=http://0.0.0.0:5000
- LEEK_WEB_URL=http://0.0.0.0:8000
- LEEK_ES_URL=http://es01:9200
- LEEK_ENABLE_DDTRACE=false
# Authentication
- LEEK_API_ENABLE_AUTH=false
# App
- LEEK_CREATE_APP_IF_NOT_EXIST=true
# Subscriptions
- |
LEEK_AGENT_SUBSCRIPTIONS=
[
{
"broker": "amqp://admin:admin@mq//",
"broker_management_url": "http://mq:15672",
"backend": null,
"exchange": "celeryev",
"queue": "leek.fanout",
"routing_key": "#",
"org_name": "mono",
"app_name": "leek",
"app_env": "prod",
"prefetch_count": 1000,
"concurrency_pool_size": 3,
"batch_max_size_in_mb": 1,
"batch_max_number_of_messages": 1000,
"batch_max_window_in_seconds": 5
}
]
- LEEK_AGENT_API_SECRET=not-secret
ports:
- 5000:5000
depends_on:
mq:
condition: service_healthy
# Just for local development!! (Test worker)
worker:
build:
context: demo
environment:
- BROKER_URL=pyamqp://admin:admin@mq:5672
depends_on:
mq:
condition: service_healthy
# Just for local development!! (Test client)
publisher:
build:
context: demo
environment:
- BROKER_URL=pyamqp://admin:admin@mq:5672
command: >
bash -c "python3 publisher.py"
depends_on:
mq:
condition: service_healthy
# Just for local development!! (Test broker)
mq:
image: rabbitmq:3.8.9-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin
- "RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit log [{console,[{level,error}]}]"
ports:
- 15672:15672
- 5672:5672
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
interval: 2s
timeout: 4s
retries: 20
# Just for local development!! (Test index db)
es01:
image: elasticsearch:7.10.1
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- cluster.initial_master_nodes=es01
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
command: ["elasticsearch", "-Elogger.level=ERROR"]
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 30s
retries: 3
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
ports:
- 9200:9200
# Uncomment to test Leek with OpenDistro Elasticsearch Distribution
# es01:
# build:
# context: app
# dockerfile: dockers/opendistro.Dockerfile
# container_name: es01
# environment:
# - node.name=es01
# - cluster.name=es-docker-cluster
# - cluster.initial_master_nodes=es01
# - bootstrap.memory_lock=true
# - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
# command: ["elasticsearch", "-Elogger.level=ERROR"]
# healthcheck:
# test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
# interval: 30s
# timeout: 30s
# retries: 3
# ulimits:
# memlock:
# soft: -1
# hard: -1
# nofile:
# soft: 65535
# hard: 65535
# ports:
# - 9200:9200
# Uncomment to test Leek with OpenSearch Elasticsearch Distribution
# es01:
# build:
# context: app
# dockerfile: dockers/opensearch.Dockerfile
# container_name: es01
# environment:
# - bootstrap.memory_lock=true
# - discovery.type=single-node
# - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
# healthcheck:
# test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
# interval: 30s
# timeout: 30s
# retries: 3
# ulimits:
# memlock:
# soft: -1
# hard: -1
# nofile:
# soft: 65535
# hard: 65535
# ports:
# - 9200:9200