-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
216 lines (201 loc) · 5.49 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
version: '3.5'
services:
elasticsearch:
build: ./elasticsearch
volumes:
- "${ESDATA}:/usr/share/elasticsearch/data:z"
- "./elasticsearch/:/sm-elasticsearch:ro"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ports:
- "9200:9200"
- "9300:9300"
networks:
- sm
redis:
image: redis:7.4.0-alpine
ports:
- "6379:6379"
networks:
- sm
rabbitmq:
image: rabbitmq:3.13.7-management
environment:
RABBITMQ_DEFAULT_USER: sm
RABBITMQ_DEFAULT_PASS: password
ports:
- "5672:5672" # to use rabbitmq from host
- "15672:15672" # management interface
networks:
- sm
postgres:
image: postgres:16.3-alpine
volumes:
- "/etc/timezone:/etc/timezone:ro" # Timezones are optional, may not work on non-Linux platforms
- "/etc/localtime:/etc/localtime:ro"
- "./postgres/initdb.d/:/docker-entrypoint-initdb.d:ro"
- "${PGDATA}:/pgdata:rw"
# user: "$SM_USER" # The postgres image still has issues running as non-root users, so this is disabled for now
environment:
POSTGRES_USER: sm
POSTGRES_PASSWORD: password
# The default mount point for pgdata isn't accessible to non-root users, so move it
PGDATA: /pgdata
ports:
- "5432:5432"
networks:
- sm
off-sample:
image: metaspace2020/off-sample
ports:
- "9876:9876"
networks:
- sm
api:
build:
context: ..
dockerfile: docker/sm-engine/Dockerfile
command: /sm-engine/start-api.sh
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-engine:/sm-engine:ro"
user: "$SM_USER"
ports:
- "5123:5123"
networks:
- sm
depends_on:
- rabbitmq
- postgres
- elasticsearch
# extra_hosts: # Uncomment if graphql is run outside of Docker
# - "graphql:172.17.0.1"
update-daemon:
build:
context: ..
dockerfile: docker/sm-engine/Dockerfile
command: /sm-engine/start-update-daemon.sh
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-engine:/sm-engine:ro"
user: "$SM_USER"
networks:
- sm
depends_on:
- rabbitmq
- postgres
- elasticsearch
# extra_hosts: # Uncomment if graphql is run outside of Docker
# - "graphql:172.17.0.1"
lithops-daemon:
build:
context: ..
dockerfile: docker/sm-engine/Dockerfile
command: /sm-engine/start-lithops-daemon.sh
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-engine:/sm-engine:ro"
user: "$SM_USER"
networks:
- sm
depends_on:
- rabbitmq
- postgres
- elasticsearch
annotate-daemon:
build:
context: ..
dockerfile: docker/sm-engine/Dockerfile
command: /sm-engine/start-annotate-daemon.sh
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-engine:/sm-engine:ro"
user: "$SM_USER"
environment:
SPARK_WORKER_CORES: 4
# deploy:
# resources:
# limits:
# memory: 16gb
ports:
- "4040:4040"
networks:
- sm
depends_on:
- rabbitmq
- postgres
- elasticsearch
# extra_hosts: # Uncomment if graphql is run outside of Docker
# - "graphql:172.17.0.1"
graphql:
build:
context: ./sm-graphql
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-graphql:/sm-graphql:ro"
user: "$SM_USER"
ports:
- "3010:3010"
- "5666:5666"
- "4201:4201"
- "9229:9229"
networks:
- sm
depends_on:
- postgres
- rabbitmq
# extra_hosts:
# - "api:172.17.0.1"
webapp:
build: ./sm-webapp
volumes:
- "${DEV_ROOT}:/opt/dev/metaspace:z"
- "${DATA_ROOT}:/opt/data/metaspace:z"
- "./sm-webapp:/sm-webapp:ro"
user: "$SM_USER"
networks:
- sm
nginx:
build: ./nginx
volumes:
# To run nginx aganst a prod build of webapp, first build webapp, then uncomment this and
# the related section in docker/nginx/config/sites-enabled/default
# - "${DEV_ROOT}/metaspace/webapp/dist/:/var/www/webapp:ro"
- "${DATA_ROOT}/mol-images/:/var/www/mol-images:z"
- "./nginx/:/nginx:ro"
ports:
- "${WWW_PORT}:8999"
networks:
- sm
# extra_hosts: # Uncomment as needed if api or graphql need to be run outside of Docker
# - "api:172.17.0.1"
# - "graphql:172.17.0.1"
storage:
image: minio/minio:RELEASE.2024-06-29T01-20-47Z
entrypoint: sh
command: -c 'mkdir -p /data/sm-centroids-dev && mkdir -p /data/sm-engine-dev && mkdir -p /data/sm-image-storage-dev && mkdir -p /data/sm-imzml-browser-dev && mkdir -p /data/sm-lithops-temp-dev && /usr/bin/minio server /data --console-address ":9001"'
volumes:
- "${DATA_ROOT}/s3:/data"
ports:
- "${STORAGE_PORT}:9000"
- '9001:9001'
networks:
- sm
networks:
sm:
driver: bridge