-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.tests.yml
52 lines (50 loc) · 1.12 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
version: '3.6'
services:
mongo:
container_name: mongo
image: mongo:4.4
command: --replSet rs --bind_ip_all --keyFile /mongo-replicator/keyfile
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
networks:
- node-mongo-tests
ports:
- 27017:27017
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./mongo-replicator:/mongo-replicator
- type: volume
source: mongodb
target: /data/db
- type: volume
source: mongodb-cfg
target: /data/configdb
mongo-replicator:
container_name: mongo-replicator
build: ./mongo-replicator
environment:
- HOST=mongo
- PORT=27017
- USERNAME=root
- PASSWORD=root
- REPLICA_SET_NAME=rs
networks:
- node-mongo-tests
depends_on:
- mongo
tests:
container_name: tests
build:
context: .
dockerfile: ./Dockerfile.tests
networks:
- node-mongo-tests
depends_on:
- mongo-replicator
networks:
node-mongo-tests:
name: node-mongo-tests-network
volumes:
mongodb:
mongodb-cfg: