-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
278 lines (263 loc) · 11 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
version: "3.7"
services:
prefect_setup:
build: ./prefect
networks:
- prefect-server
prefect_postgres:
restart: "always"
image: "postgres:11"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- prefect_postgres:/var/lib/postgresql/data
networks:
- prefect-server
healthcheck:
test: pg_isready -q -d $${POSTGRES_DB} -U $${POSTGRES_USER} || exit 1
interval: 10s
timeout: 2s
retries: 60
start_period: 2s
command:
- "postgres"
# explicitly set max connections
- "-c"
- "max_connections=150"
prefect_hasura:
restart: "always"
image: "hasura/graphql-engine:v1.3.3"
ports:
- "3000:3000"
command: "graphql-engine serve"
environment:
HASURA_GRAPHQL_DATABASE_URL: ${DB_CONNECTION_URL}
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_SERVER_PORT: "3000"
HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE: 100
HASURA_GRAPHQL_LOG_LEVEL: "warn"
networks:
- prefect-server
healthcheck:
test: wget -O - http://hasura:3000/healthz &>/dev/null || exit 1
interval: 10s
timeout: 2s
retries: 60
start_period: 1s
depends_on:
- prefect_postgres
prefect_graphql:
restart: "always"
image: "prefecthq/server:latest"
ports:
- "4201:4201"
command: bash -c "${PREFECT_SERVER_DB_CMD} && python src/prefect_server/services/graphql/server.py"
environment:
PREFECT_SERVER_DB_CMD: ${PREFECT_SERVER_DB_CMD:-"echo 'DATABASE MIGRATIONS SKIPPED'"}
PREFECT_SERVER__DATABASE__CONNECTION_URL: ${DB_CONNECTION_URL}
PREFECT_SERVER__HASURA__ADMIN_SECRET: ${PREFECT_SERVER__HASURA__ADMIN_SECRET:-hasura-secret-admin-secret}
PREFECT_SERVER__HASURA__HOST: prefect_hasura
networks:
- prefect-server
healthcheck:
test: curl --fail --silent "http://prefect_graphql:4201/health" &> /dev/null || exit 1
interval: 20s
timeout: 2s
retries: 60
start_period: 1s
depends_on:
- prefect_hasura
prefect_towel:
restart: "always"
image: "prefecthq/server:latest"
command: "python src/prefect_server/services/towel/__main__.py"
environment:
PREFECT_SERVER__HASURA__ADMIN_SECRET: ${PREFECT_SERVER__HASURA__ADMIN_SECRET:-hasura-secret-admin-secret}
PREFECT_SERVER__HASURA__HOST: prefect_hasura
networks:
- prefect-server
depends_on:
- prefect_graphql
prefect_apollo:
restart: "always"
image: "prefecthq/apollo:latest"
command: bash -c "./post-start.sh && npm run serve"
ports:
- 4200:4200
environment:
HASURA_API_URL: http://prefect_hasura:3000/v1alpha1/graphql
PREFECT_API_URL: http://prefect_graphql:4201/graphql/
PREFECT_API_HEALTH_URL: http://prefect_graphql:4201/health
PREFECT_SERVER__TELEMETRY__ENABLED: "false"
GRAPHQL_SERVICE_HOST: http://prefect_graphql
GRAPHQL_SERVICE_PORT: 4201
networks:
- prefect-server
healthcheck:
test: curl --fail --silent "http://prefect_apollo:4200/.well-known/apollo/server-health" &> /dev/null || exit 1
interval: 10s
timeout: 2s
retries: 60
start_period: 1s
depends_on:
- prefect_graphql
prefect_ui:
restart: "always"
image: "prefecthq/ui:2021-02-23"
ports:
- "8081:8080"
command: "/intercept.sh"
environment:
PREFECT_SERVER__APOLLO_URL: http://localhost:4200/graphql
PREFECT_BACKEND: server
networks:
- prefect-server
healthcheck:
test: curl --fail --silent --head "http://prefect_ui:8080/" &> /dev/null || exit 1
interval: 30s
timeout: 5s
retries: 3
depends_on:
- prefect_apollo
es01:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
volumes:
- "es01:/usr/share/elasticsearch/data"
- "./certs:/usr/share/elasticsearch/config/certificates:ro"
ports:
- "9200:9200"
environment:
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
ELASTIC_PASSWORD: ${ELASTICSEARCH_PWD}
node.name: es01
cluster.name: es-docker-cluster
discovery.seed_hosts: es02,es03
cluster.initial_master_nodes: es01,es02,es03
network.host: 0.0.0.0
xpack.license.self_generated.type: basic
xpack.monitoring.collection.enabled: "true"
xpack.security.enabled: "true"
xpack.security.http.ssl.enabled: "true"
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/es01/es01.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/es01/es01.crt
xpack.security.transport.ssl.enabled: "true"
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/es01/es01.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/es01/es01.key
cluster.routing.allocation.disk.threshold_enabled: "true"
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%
http.cors.enabled : "true"
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : Authorization,X-Requested-With,X-Auth-Token,Content-Type, Content-Length
depends_on:
- es02
- es03
ulimits:
memlock:
soft: 262144
hard: 500000
es02:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
volumes:
- "es02:/usr/share/elasticsearch/data"
- "./certs:/usr/share/elasticsearch/config/certificates:ro"
environment:
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
ELASTIC_PASSWORD: ${ELASTICSEARCH_PWD}
node.name: es02
cluster.name: es-docker-cluster
discovery.seed_hosts: es01,es03
cluster.initial_master_nodes: es01,es02,es03
xpack.license.self_generated.type: basic
xpack.monitoring.collection.enabled: "true"
xpack.security.enabled: "true"
xpack.security.http.ssl.enabled: "true"
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/es02/es02.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/es02/es02.crt
xpack.security.transport.ssl.enabled: "true"
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/es02/es02.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/es02/es02.key
cluster.routing.allocation.disk.threshold_enabled: "true"
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%
ulimits:
memlock:
soft: 262144
hard: 500000
es03:
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
volumes:
- "es03:/usr/share/elasticsearch/data"
- "./certs:/usr/share/elasticsearch/config/certificates:ro"
environment:
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
ELASTIC_PASSWORD: ${ELASTICSEARCH_PWD}
node.name: es03
cluster.name: es-docker-cluster
discovery.seed_hosts: es01,es02
cluster.initial_master_nodes: es01,es02,es03
xpack.license.self_generated.type: basic
xpack.monitoring.collection.enabled: "true"
xpack.security.enabled: "true"
xpack.security.http.ssl.enabled: "true"
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certificates/es03/es03.key
xpack.security.http.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certificates/es03/es03.crt
xpack.security.transport.ssl.enabled: "true"
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certificates/ca/ca.crt
xpack.security.transport.ssl.certificate: /usr/share/elasticsearch/config/certificates/es03/es03.crt
xpack.security.transport.ssl.key: /usr/share/elasticsearch/config/certificates/es03/es03.key
cluster.routing.allocation.disk.threshold_enabled: "true"
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%
ulimits:
memlock:
soft: 262144
hard: 500000
kibana:
image: docker.elastic.co/kibana/kibana:7.12.0
restart: always
volumes:
- type: bind
source: ./kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
- "./certs:/usr/share/elasticsearch/config/certificates:ro"
ports:
- "5601:5601"
depends_on:
- es01
# source : https://docs.min.io/docs/deploy-minio-on-docker-compose.html
minio:
restart: always
image: minio/minio:RELEASE.2021-04-06T23-11-00Z-24-g409125240
command: server /data
ports:
- 9000:9000
volumes:
- minio:/data
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
volumes:
es01:
es02:
es03:
minio:
prefect_postgres:
networks:
prefect-server:
name: prefect-server