-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathdocker-compose.yml
107 lines (83 loc) · 3.31 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
# Docker Compose file for running BlackLab CI tests.
version: '3.9'
services:
# Indexes the test data and starts the BLS server
# (remote debugging is always enabled)
testserver:
build:
context: ..
dockerfile: docker/Dockerfile
args:
# Allow for custom configuration of tomcat/blacklab server if necessary
CONFIG_ROOT: ${CONFIG_ROOT:-docker/config}
environment:
# JPDA settings, to allow remote debugging
#- JPDA_ADDRESS=*:5005
#- JPDA_TRANSPORT=dt_socket
# Pass overridden feature flag(s) directly to the container (for testing both values)
- BLACKLAB_FEATURE_defaultIndexType
volumes:
# Test data to index
- ./data:/test-data
# Script that indexes test data
- ./start-with-test-data.sh:/etc/blacklab/start-with-test-data.sh
# Volume where indexed corpus is stored
- blacklab-test-data:/data
# Create test index and run Tomcat
command: "/bin/bash /etc/blacklab/start-with-test-data.sh"
ports:
- "${BLACKLAB_TEST_PORT:-8080}:8080"
# - "5005:5005" # (JPDA port for connecting debugger)
# Proxy to Solr
proxy:
build:
context: ..
dockerfile: proxy/Dockerfile
volumes:
# Configuration file (pointing to solr and specifying a default corpus name)
- ../solr/proxy.yaml:/etc/blacklab/proxy.yaml
ports:
# Use port 8080 so it's the same exact URL as BLS would be (for running the same tests)
- "8080:8080"
# Solr backend we're proxying for
# (already contains the test corpus)
solr:
build:
context: ..
dockerfile: solr/Dockerfile
# Runs the tests on the CI server (doesn't save missing test responses, just fails)
test:
build: .
environment:
- APP_URL=${APP_URL:-http://testserver:8080/blacklab-server}
- CORPUS_NAME=${CORPUS_NAME:-test}
- TEST_DATA_ROOT=${TEST_DATA_ROOT:-data}
- SKIP_INDEXING_TESTS=${SKIP_INDEXING_TESTS:-false} # Solr doesn't implement these ops yet
- INDEX_TYPE=${INDEX_TYPE:-}
# If response file for a test does not exist, the test will FAIL.
- BLACKLAB_TEST_SAVE_MISSING_RESPONSES=false
#extra_hosts:
# - "host.docker.internal:host-gateway"
# Runs the tests locally, so we can save new test responses
test-local:
build: .
environment:
- APP_URL=${APP_URL:-http://testserver:8080/blacklab-server}
- CORPUS_NAME=${CORPUS_NAME:-test}
- TEST_DATA_ROOT=${TEST_DATA_ROOT:-data}
- SKIP_INDEXING_TESTS=${SKIP_INDEXING_TESTS:-false} # Solr doesn't implement these ops yet
- INDEX_TYPE=${INDEX_TYPE:-}
# If response file for a test does not exist, the test will SUCCEED,
# and the response file will be saved for future runs.
- BLACKLAB_TEST_SAVE_MISSING_RESPONSES=true
#extra_hosts:
# - "host.docker.internal:host-gateway"
volumes:
# We need access to the previous responses and be able to save responses for any new tests.
- ./data/saved-responses:/app/data/saved-responses
- ./data/saved-responses-integrated:/app/data/saved-responses-integrated
- ./data/latest-test-output:/app/data/latest-test-output
- ./data/latest-test-output-integrated:/app/data/latest-test-output-integrated
# Volume where our indexes will be stored.
volumes:
blacklab-test-data: {}