-
-
Notifications
You must be signed in to change notification settings - Fork 165
/
docker-compose.yml
184 lines (180 loc) · 5.07 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# For demo purposes
services:
rest-server:
build:
context: .
dockerfile: ./build/rest-server/Dockerfile
ports:
- "9234:9234"
command: rest-server -env /api/env.example
environment:
DATABASE_HOST: "postgres"
ELASTICSEARCH_URL: "http://elasticsearch:9200"
JAEGER_ENDPOINT: "http://jaeger:14268/api/traces"
# KAFKA_HOST: "kafka"
MEMCACHED_HOST: "memcached:11211"
# RABBITMQ_URL: "amqp://guest:guest@rabbitmq:5672/"
REDIS_HOST: "redis:6379"
VAULT_ADDRESS: "http://vault:8300"
# docker-compose run rest-server tern migrate --migrations "/api/migrations/" --conn-string "postgres://user:password@postgres:5432/dbname?sslmode=disable"
depends_on:
postgres:
condition: service_healthy
vault:
condition: service_started
prometheus:
condition: service_started
jaeger:
condition: service_started
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
memcached:
condition: service_healthy
# zookeeper:
# condition: service_started
# kafka:
# condition: service_started
# rabbitmq:
# condition: service_started
prometheus:
image: prom/prometheus:v2.40.7
ports:
- "9090:9090"
volumes:
- ./docs/prometheus.yml:/etc/prometheus/prometheus.yml
jaeger:
image: jaegertracing/all-in-one:1.40.0
ports:
- "16686:16686"
- "14268:14268"
postgres:
image: postgres:16.2-bullseye
ports:
- "5432:5432"
environment:
POSTGRES_DB: "dbname"
POSTGRES_HOST_AUTH_METHOD: "trust"
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "user"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 10
start_period: 40s
vault:
image: vault:1.12.4
ports:
- "8300:8300"
cap_add:
- IPC_LOCK
environment:
VAULT_DEV_LISTEN_ADDRESS: "0.0.0.0:8300"
VAULT_DEV_ROOT_TOKEN_ID: "myroot"
elasticsearch:
image: elasticsearch:7.17.9
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 20s
timeout: 1s
retries: 5
# elasticsearch-indexer-rabbitmq:
# build:
# context: .
# dockerfile: ./build/elasticsearch-indexer-rabbitmq/Dockerfile
# command: elasticsearch-indexer -env /api/env.example
# environment:
# ELASTICSEARCH_URL: "http://elasticsearch:9200"
# JAEGER_ENDPOINT: "http://jaeger:14268/api/traces"
# RABBITMQ_URL: "amqp://guest:guest@rabbitmq:5672/"
# VAULT_ADDRESS: "http://vault:8300"
# depends_on:
# - vault
# - prometheus
# - jaeger
# - elasticsearch
# - rabbitmq
# rabbitmq:
# image: rabbitmq:3.11.10-management-alpine
# ports:
# - "5672:5672"
# - "15672:15672"
# elasticsearch-indexer-kafka:
# build:
# context: .
# dockerfile: ./build/elasticsearch-indexer-kafka/Dockerfile
# command: elasticsearch-indexer -env /api/env.example
# environment:
# ELASTICSEARCH_URL: "http://elasticsearch:9200"
# JAEGER_ENDPOINT: "http://jaeger:14268/api/traces"
# KAFKA_HOST: "kafka"
# VAULT_ADDRESS: "http://vault:8300"
# depends_on:
# - vault
# - prometheus
# - jaeger
# - elasticsearch
# - kafka
# - zookeeper
# zookeeper:
# image: wurstmeister/zookeeper:3.4.6
# ports:
# - "2181:2181"
# kafka:
# image: wurstmeister/kafka:2.13-2.8.1
# ports:
# - "9092:9092"
# links:
# - zookeeper
# environment:
# KAFKA_ADVERTISED_HOST_NAME: "kafka"
# KAFKA_ADVERTISED_PORT: 9092
# KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
# KAFKA_CREATE_TOPICS: "tasks:1:1"
# KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
elasticsearch-indexer-redis:
build:
context: .
dockerfile: ./build/elasticsearch-indexer-redis/Dockerfile
command: elasticsearch-indexer -env /api/env.example
environment:
ELASTICSEARCH_URL: "http://elasticsearch:9200"
JAEGER_ENDPOINT: "http://jaeger:14268/api/traces"
REDIS_HOST: "redis:6379"
VAULT_ADDRESS: "http://vault:8300"
depends_on:
elasticsearch:
condition: service_healthy
jaeger:
condition: service_started
prometheus:
condition: service_started
redis:
condition: service_healthy
vault:
condition: service_started
redis:
image: redis:7.0.9-alpine3.17
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
interval: 20s
timeout: 1s
retries: 5
memcached:
image: memcached:1.6.19-alpine3.17
ports:
- "11211:11211"
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 11211 || exit 1"]
interval: 20s
timeout: 1s
retries: 5