-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose-cluster.yml
More file actions
113 lines (106 loc) · 3.14 KB
/
Copy pathdocker-compose-cluster.yml
File metadata and controls
113 lines (106 loc) · 3.14 KB
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
# Copyright 2024 The ModelarDB Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
x-aws-variables: &aws-variables
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_DEFAULT_REGION: eu-central-1
AWS_ENDPOINT: http://minio-server:9000
AWS_ALLOW_HTTP: true
services:
# Object store services.
minio-server:
image: pgsty/minio
container_name: minio-server
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server --console-address ":9001" /data
create-bucket:
image: pgsty/mc
container_name: create-bucket
depends_on:
- minio-server
entrypoint:
/bin/sh -c "
sleep 2;
/usr/bin/mc alias set modelardb-minio http://minio-server:9000 minioadmin minioadmin;
/usr/bin/mc mb modelardb-minio/modelardb;
exit 0;
"
# ModelarDB services.
modelardb-edge-1:
build: .
image: modelardb
container_name: modelardb-edge-1
command: [ "target/release/modelardbd", "edge", "data/edge", "s3://modelardb" ]
ports:
- "9999:9999"
environment:
<<: *aws-variables
MODELARDBD_HOST: modelardb-edge-1
MODELARDBD_PORT: 9999
depends_on:
create-bucket:
condition: service_completed_successfully
healthcheck:
test: [ "CMD", "echo", "ready" ]
interval: 2s
modelardb-edge-2:
image: modelardb
container_name: modelardb-edge-2
command: [ "target/release/modelardbd", "edge", "data/edge", "s3://modelardb" ]
ports:
- "9998:9998"
environment:
<<: *aws-variables
MODELARDBD_PORT: 9998
MODELARDBD_HOST: modelardb-edge-2
depends_on:
modelardb-edge-1:
condition: service_healthy
healthcheck:
test: [ "CMD", "echo", "ready" ]
interval: 2s
modelardb-cloud-1:
image: modelardb
container_name: modelardb-cloud-1
command: [ "target/release/modelardbd", "cloud", "data/cloud", "s3://modelardb" ]
ports:
- "9997:9997"
environment:
<<: *aws-variables
MODELARDBD_PORT: 9997
MODELARDBD_HOST: modelardb-cloud-1
depends_on:
modelardb-edge-2:
condition: service_healthy
healthcheck:
test: [ "CMD", "echo", "ready" ]
interval: 2s
modelardb-cloud-2:
image: modelardb
container_name: modelardb-cloud-2
command: [ "target/release/modelardbd", "cloud", "data/cloud", "s3://modelardb" ]
ports:
- "9996:9996"
environment:
<<: *aws-variables
MODELARDBD_PORT: 9996
MODELARDBD_HOST: modelardb-cloud-2
depends_on:
modelardb-cloud-1:
condition: service_healthy