-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
145 lines (135 loc) · 4.2 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
version: '3'
services:
opensearch-node:
image: opensearchproject/opensearch:latest
container_name: opensearch-node
restart: on-failure
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node
- discovery.type=single-node
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- DISABLE_INSTALL_DEMO_CONFIG=true # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
- DISABLE_SECURITY_PLUGIN=true # Disables Security plugin
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
networks:
- opensearch-net
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
restart: on-failure
ports:
- 5601:5601
expose:
- '5601'
environment:
- 'OPENSEARCH_HOSTS=["http://opensearch-node:9200"]'
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true" # disables security dashboards plugin in OpenSearch Dashboards
networks:
- opensearch-net
dashboards-init:
image: curlimages/curl
container_name: init
restart: on-failure
volumes:
- ./init/dashboard.ndjson:/tmp/dashboard.ndjson
entrypoint:
- /bin/sh
- '-c'
- |
URL=http://opensearch-dashboards:5601
status_code=$$(curl --write-out %{http_code} --silent --output /dev/null $$URL/app/home)
echo 'Waiting for opensearch-dashboards to be in ready state...'
sleep 2
while [ $$status_code -ne 200 ]
do
status_code=$$(curl --write-out %{http_code} --silent --output /dev/null $$URL/app/home)
echo 'Waiting for opensearch-dashboards to be in ready state...'
sleep 2
done
echo 'Starting to import dashboards...'
curl -X POST --silent \
--form file=@/tmp/dashboard.ndjson \
-H "securitytenant: Global" \
-H "osd-xsrf: true" \
"$$URL/api/saved_objects/_import?overwrite=true"
echo 'Completed importing dashboards'
depends_on:
- opensearch-node
- opensearch-dashboards
networks:
- opensearch-net
data-init:
image: ghcr.io/preferredai/cornac-ab-sample-data:0.9.1
container_name: data-init
restart: on-failure
environment:
- OPENSEARCH_HOST=opensearch-node
- OPENSEARCH_PORT=9200
depends_on:
dashboards-init:
condition: service_completed_successfully
networks:
- opensearch-net
cornac-ab-backend:
image: ghcr.io/preferredai/cornac-ab-backend:0.9.3
container_name: cornac-ab-backend
restart: on-failure
environment:
- OPENSEARCH_HOST=opensearch-node
- OPENSEARCH_PORT=9200
- SPRING_DATASOURCE_URL=jdbc:h2:file:/tmp/data/demodb
- CORNAC_UPLOAD_DIR=/tmp/uploads
- CORNAC_EXECUTABLE_DIR=.
ports:
- 8080:8080
volumes:
- ./data/:/tmp/data/
# - ./cornac/:/tmp/cornac/
- ./uploads/:/tmp/uploads/
depends_on:
dashboards-init:
condition: service_completed_successfully
data-init:
condition: service_completed_successfully
networks:
- opensearch-net
- cornac-ab-net
cornac-ab-frontend:
image: ghcr.io/preferredai/cornac-ab-frontend:0.9.1
container_name: cornac-ab-frontend
restart: on-failure
ports:
- 8081:8080
depends_on:
- cornac-ab-backend
networks:
- opensearch-net
- cornac-ab-net
cornac-ab-demo:
image: ghcr.io/preferredai/cornac-ab-demo:0.9
container_name: cornac-ab-demo
restart: on-failure
ports:
- 8082:8080
depends_on:
- cornac-ab-backend
networks:
- cornac-ab-net
volumes:
opensearch-data:
networks:
opensearch-net:
cornac-ab-net: