-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-integration.yml
More file actions
77 lines (71 loc) · 1.76 KB
/
Copy pathdocker-compose-integration.yml
File metadata and controls
77 lines (71 loc) · 1.76 KB
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
services:
anvil:
image: ghcr.io/foundry-rs/foundry:stable
entrypoint: anvil
command: --fork-url ${ETH_RPC_URL:-https://eth.llamarpc.com} --host 0.0.0.0 --block-time 1
ports:
- '8545:8545'
rabbitmq:
image: rabbitmq:3.13-management
container_name: rabbitmq
ports:
- '5672:5672'
- '15672:15672'
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password
mongo1:
image: mongo:8.0
container_name: mongo1
hostname: mongo1
command: ['mongod', '--replSet', 'rs0', '--bind_ip_all', '--port', '27017']
ports:
- '27017:27017'
volumes:
- mongo1_int_data:/data/db
mongo2:
image: mongo:8.0
container_name: mongo2
hostname: mongo2
command: ['mongod', '--replSet', 'rs0', '--bind_ip_all', '--port', '27018']
ports:
- '27018:27018'
volumes:
- mongo2_int_data:/data/db
mongo3:
image: mongo:8.0
container_name: mongo3
hostname: mongo3
command: ['mongod', '--replSet', 'rs0', '--bind_ip_all', '--port', '27019']
ports:
- '27019:27019'
volumes:
- mongo3_int_data:/data/db
mongo-init-replica:
image: mongo:8.0
container_name: mongo-init-replica
depends_on:
- mongo1
- mongo2
- mongo3
entrypoint: /bin/bash
command: >
-c "
echo 'Waiting for MongoDB nodes...';
sleep 5;
mongosh --host mongo1:27017 --eval '
rs.initiate({
_id: \"rs0\",
members: [
{ _id: 0, host: \"mongo1:27017\" },
{ _id: 1, host: \"mongo2:27018\" },
{ _id: 2, host: \"mongo3:27019\" }
]
});
';
echo 'Replica set initialized.'
"
volumes:
mongo1_int_data:
mongo2_int_data:
mongo3_int_data: