-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (61 loc) · 2.07 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
# Defines services that can be started in development/test environments within
# the container environment created by Dock.
#
# See the dock/start-everything script for an example of how this is invoked.
version: '2.1'
services:
voter-verifier_base:
build:
context: .
dockerfile: dock/bootstrap_Dockerfile
environment:
APP_UID:
APP_GID:
ELASTICSEARCH_HOSTS: http://docker-host:9200/
# Add healthchecks with appropriate parameters to see if the service is actually listening on
# the port. Note: This interval and retries are set for smaller services that come up relatively fast.
# For bigger services these may need to be tweaked.
# If it's an http service you may use curl the test. e.g. curl localhost:3000
# reference: https://docs.docker.com/compose/compose-file/compose-file-v2/#healthcheck
healthcheck:
test: 'netstat -nlp | grep 9095' # parametrize ports
interval: 1s
timeout: 10s
retries: 120
ports:
- '9095:9095'
- '3000:3000'
volumes:
- '.:/src'
working_dir: '/src'
command: ['bash', '-c', 'dock/initialize && dock/datastore_setup && dock/run']
voter-verifier:
extends: voter-verifier_base
depends_on:
# We just need to check if the service is healthy. The actual port test is done in
# base-compose.yml for all the datastores.
elasticsearch:
condition: service_healthy
environment:
VOTER_VERIFIER_ENV: development
voter-verifier_test:
extends: voter-verifier_base
depends_on:
elasticsearch_test:
condition: service_healthy
environment:
VOTER_VERIFIER_ENV: test
elasticsearch:
extends:
file: $BASE_COMPOSE
service: elasticsearch_dev_base
command: ['elasticsearch']
elasticsearch_test:
extends:
file: $BASE_COMPOSE
service: elasticsearch_test_base
command: ['elasticsearch']
# Define names of volumes that you want to be preserved between container restarts.
# These are referenced above in the `volumes` section of the service.
# volumes:
# elasticsearch: