-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
231 lines (222 loc) · 6.37 KB
/
docker-compose.yml
File metadata and controls
231 lines (222 loc) · 6.37 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
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
services:
############################
# shared services
############################
elasticsearch:
image: elasticsearch:${ELASTICSEARCH_VERSION:-7.17.28}
container_name: elasticsearch
environment:
- cluster.name=datashare
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
- cluster.routing.allocation.disk.watermark.high=256mb
- cluster.routing.allocation.disk.watermark.flood_stage=128mb
- discovery.type=single-node
- discovery.zen.minimum_master_nodes=1
- xpack.license.self_generated.type=basic
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin=*
- http.cors.allow-methods=OPTIONS, HEAD, GET, POST, PUT, DELETE
- ES_JAVA_OPTS=-Xms256m -Xmx256m
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail elasticsearch:9200/_cluster/health || exit 1" ]
interval: 2s
timeout: 3s
start_period: 5s
retries: 10
ports:
- "9200:9200"
volumes:
- elasticsearch-data:/var/lib/elasticsearch/data
networks:
- datashare-network
postgres:
# TODO: Figure out missing root user error
image: postgres:${POSTGRESQL_VERSION:-18.1}
container_name: postgres
environment:
POSTGRES_USER: datashare
POSTGRES_PASSWORD: datashare
POSTGRES_DB: datashare
PGDATA: /var/lib/postgresql/18/docker
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-U", "datashare" ]
interval: 2s
retries: 5
expose:
- 5432
volumes:
- postgres-data:/var/lib/postgresql
networks:
- datashare-network
redis:
image: redis:${REDIS_VERSION:-8.6-rc1-trixie}
container_name: redis
restart: on-failure
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 2s
retries: 5
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- datashare-network
############################
# temporal
############################
temporal-pre-init:
image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION-1.29}
container_name: temporal-pre-init
depends_on:
postgres:
condition: service_healthy
environment:
- POSTGRES_DB=temporal
- POSTGRES_VISIBILITY_DB=temporal_visibility
- POSTGRES_PORT=5432
- POSTGRES_USER=datashare
- POSTGRES_PWD=datashare
- POSTGRES_SEEDS=postgres
networks:
- datashare-network
volumes:
- .testcontainers/temporal:/scripts/
entrypoint: [ "/bin/bash" ]
command: /scripts/pre-init.sh
temporal:
image: temporalio/server:${TEMPORAL_VERSION:-1.29.2}
container_name: temporal
depends_on:
postgres:
condition: service_healthy
temporal-pre-init:
condition: service_completed_successfully
environment:
- DB=postgres12_pgx
- DB_PORT=5432
- POSTGRES_USER=datashare
- POSTGRES_PWD=datashare
- POSTGRES_SEEDS=postgres
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
- DBNAME=temporal
- VISIBILITY_DBNAME=temporal_visibility
healthcheck:
test: [ "CMD", "nc", "-z", "temporal", "7233" ]
interval: 2s
timeout: 3s
start_period: 5s
retries: 10
ports:
- "7233:7233"
volumes:
- .testcontainers/temporal:/etc/temporal/.config/temporalio/
networks:
- datashare-network
temporal-post-init:
image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_VERSION-1.29}
container_name: temporal-post-init
depends_on:
temporal:
condition: service_healthy
networks:
- datashare-network
volumes:
- .testcontainers/temporal:/scripts
entrypoint: [ "/bin/sh" ]
command: /scripts/post-init.sh
temporal-ui:
image: temporalio/ui:${TEMPORAL_UI_VERSION:-2.45.3}
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
ports:
- "8233:8080"
networks:
- datashare-network
datashare-workers:
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
args:
PREDOWNLOAD_MODELS: true
depends_on:
- temporal
volumes:
- ${PWD}/.data/temporal:/temporal/data
networks:
- datashare-network
############################
# datashare
############################
datashare-init:
image: icij/datashare:${DATASHARE_VERSION:-20.14.10}
container_name: datashare-init
depends_on:
elasticsearch:
condition: service_healthy
networks:
- datashare-network
command: >-
--mode CLI
--createIndex sandbox
--dataSourceUrl jdbc:postgresql://postgres/datashare?user=datashare\&password=datashare
--queueType REDIS
--redisAddress redis://redis:6379
--elasticsearchAddress http://elasticsearch:9200
datashare:
image: icij/datashare:${DATASHARE_VERSION:-20.14.10}
container_name: datashare
hostname: datashare
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
datashare-init:
condition: service_completed_successfully
environment:
DS_DOCKER_MOUNTED_DATA_DIR: ${PWD}/data
TEMPORAL_ADDRESS: http://temporal:7233
ports:
- "8080:8080"
volumes:
- type: bind
source: ${PWD}/.data/datashare
target: /home/datashare/Datashare
networks:
- datashare-network
command: >-
--mode SERVER
--taskRoutingStrategy GROUP
--dataDir /home/datashare/Datashare
--pluginsDir /home/datashare/plugins
--extensionsDir /home/datashare/extensions
--authFilter org.icij.datashare.session.YesCookieAuthFilter
--dataSourceUrl jdbc:postgresql://postgres/datashare?user=datashare\&password=datashare
--defaultProject sandbox
--elasticsearchAddress http://elasticsearch:9200
--rootHost http://localhost:8080
--queueType REDIS
--redisAddress redis://redis:6379
--sessionStoreType REDIS
--sessionTtlSeconds 43200
--tcpListenPort 8080
--batchQueueType TEMPORAL
--messageBusAddress temporal:7233
networks:
datashare-network:
driver: bridge
name: datashare-network
volumes:
elasticsearch-data:
postgres-data:
redis-data: