-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.tests.yml
99 lines (93 loc) · 2.44 KB
/
docker-compose.tests.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
version: '3.8'
services:
mongodb1:
image: mongo:5.0
container_name: m2e-test-mongo1
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/admin --quiet
interval: 1s
timeout: 10s
retries: 5
start_period: 60s
command: mongod --bind_ip_all --replSet rs0 --quiet --logpath /dev/null
extra_hosts:
- host.docker.internal:host-gateway
ports:
- 30000:27017
volumes:
- m2e-test-mongo1:/data/db
mongodb2:
image: mongo:5.0
container_name: m2e-test-mongo2
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/admin --quiet
interval: 1s
timeout: 10s
retries: 5
start_period: 60s
command: mongod --bind_ip_all --replSet rs0 --quiet --logpath /dev/null
extra_hosts:
- host.docker.internal:host-gateway
ports:
- 30100:27017
volumes:
- m2e-test-mongo2:/data/db
mongodb3:
image: mongo:5.0
container_name: m2e-test-mongo3
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/admin --quiet
interval: 1s
timeout: 10s
retries: 5
start_period: 60s
command: mongod --bind_ip_all --replSet rs0 --quiet --logpath /dev/null
extra_hosts:
- host.docker.internal:host-gateway
ports:
- 30200:27017
volumes:
- m2e-test-mongo3:/data/db
elasticsearch:
image: elasticsearch:7.17.0
container_name: m2e-test-elastic
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 1s
timeout: 10s
retries: 5
start_period: 60s
environment:
- discovery.type=single-node
- logger.level=ERROR
extra_hosts:
- host.docker.internal:host-gateway
ports:
- 31000:9200
- 31100:9300
volumes:
- m2e-test-elastic:/usr/share/elasticsearch/data
mongosetup:
image: mongo:5.0
depends_on:
mongodb1:
condition: service_healthy
mongodb2:
condition: service_healthy
mongodb3:
condition: service_healthy
elasticsearch:
condition: service_healthy
volumes:
- .:/scripts
restart: "no"
entrypoint: [ "bash", "/scripts/mongo_setup.sh"]
volumes:
m2e-test-mongo1:
name: m2e-test-mongo1
m2e-test-mongo2:
name: m2e-test-mongo2
m2e-test-mongo3:
name: m2e-test-mongo3
m2e-test-elastic:
name: m2e-test-elastic