-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose-all.yml
67 lines (61 loc) · 1.29 KB
/
docker-compose-all.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
version: '3'
services:
mongo1:
image: mongo:4.4
command: mongod --replSet rs0 --port 27017
ports:
- 27017:27017
networks:
- my-mongo-cluster
volumes:
- ./mongo-init/data-import/nodes.json:/tmp/nodes.json
mongo2:
image: mongo:4.4
command: mongod --replSet rs0 --port 27018
ports:
- 27018:27018
networks:
- my-mongo-cluster
mongo3:
image: mongo:4.4
command: mongod --replSet rs0 --port 27019
ports:
- 27019:27019
networks:
- my-mongo-cluster
# healthcheck:
# test: ["CMD", "test $$(echo 'rs.initiate().ok || rs.status().ok' | mongo --quiet) -eq 1"]
# interval: 30s
# timeout: 10s
# retries: 5
mongosetup:
image: mongo:4.4
links:
- mongo1:mongo1
- mongo2:mongo2
- mongo3:mongo3
depends_on:
- mongo1
- mongo2
- mongo3
volumes:
- .:/scripts
restart: "no"
entrypoint: [ "bash", "/scripts/mongo_setup.sh" ]
networks:
- my-mongo-cluster
appcontainer:
build: .
image: spring-mongodb-graphlookup:latest
environment:
- SPRING_PROFILES_ACTIVE=local
ports:
- 8080:8080
depends_on:
- mongo1
- mongo2
- mongo3
networks:
- my-mongo-cluster
networks:
my-mongo-cluster: