-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
125 lines (117 loc) · 3.19 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
x-app: &app
image: ncbo_ontology_recommender:0.0.1
build:
context: .
args:
RUBY_VERSION: '3.0'
environment: &env
BUNDLE_PATH: /usr/local/bundle
# default bundle config resolves to /usr/local/bundle/config inside of the container
# we are setting it to local app directory if we need to use 'bundle config local'
BUNDLE_APP_CONFIG: /usr/local/bundle/config
COVERAGE: 'true' # enable simplecov code coverage
REDIS_HOST: redis-ut
REDIS_PORT: 6379
MGREP_HOST: mgrep-ut
MGREP_PORT: 55556
SOLR_TERM_SEARCH_URL: http://solr-ut:8983/solr/term_search_core1
SOLR_PROP_SEARCH_URL: http://solr-ut:8983/solr/prop_search_core1
volumes:
- bundle:/usr/local/bundle
- .:/usr/src/app
stdin_open: true
tty: true
command: "bundle exec rake test TESTOPTS='-v'"
depends_on: &depends_on
solr-ut:
condition: service_healthy
redis-ut:
condition: service_healthy
mgrep-ut:
condition: service_healthy
services:
ruby:
<<: *app
environment:
<<: *env
GOO_BACKEND_NAME: 4store
GOO_PORT: 9000
GOO_HOST: 4store-ut
depends_on:
<<: *depends_on
4store-ut:
condition: service_started
profiles:
- 4store
ruby-agraph:
<<: *app
environment:
<<: *env
GOO_BACKEND_NAME: ag
GOO_PORT: 10035
GOO_HOST: agraph-ut
GOO_PATH_QUERY: /repositories/ontoportal_test
GOO_PATH_DATA: /repositories/ontoportal_test/statements
GOO_PATH_UPDATE: /repositories/ontoportal_test/statements
depends_on:
<<: *depends_on
agraph-ut:
condition: service_healthy
profiles:
- agraph
solr-ut:
image: ontoportal/solr-ut:0.2.0
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8983/solr/term_search_core1/admin/ping?wt=json | grep -iq '\"status\":\"OK\"}' || exit 1"]
start_period: 3s
interval: 10s
timeout: 5s
retries: 5
redis-ut:
image: redis
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 3s
retries: 10
mgrep-ut:
image: ontoportal/mgrep:0.0.2
platform: linux/amd64
healthcheck:
test: ["CMD", "nc", "-z", "-v", "127.0.0.1", "55556"]
start_period: 3s
interval: 10s
timeout: 5s
retries: 5
4store-ut:
image: bde2020/4store
platform: linux/amd64
command: >
bash -c "4s-backend-setup --segments 4 ontoportal_kb
&& 4s-backend ontoportal_kb
&& 4s-httpd -D -s-1 -p 9000 ontoportal_kb"
profiles:
- 4store
agraph-ut:
image: franzinc/agraph:v8.1.0
platform: linux/amd64
environment:
- AGRAPH_SUPER_USER=test
- AGRAPH_SUPER_PASSWORD=xyzzy
shm_size: 1g
command: >
bash -c "/agraph/bin/agraph-control --config /agraph/etc/agraph.cfg start
; agtool repos create --supersede ontoportal_test
; agtool users add anonymous
; agtool users grant anonymous root:ontoportal_test:rw
; tail -f /agraph/data/agraph.log"
healthcheck:
test: ["CMD-SHELL", "agtool storage-report ontoportal_test || exit 1"]
start_period: 30s
interval: 20s
timeout: 10s
retries: 10
profiles:
- agraph
volumes:
bundle: