-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
96 lines (87 loc) · 2.44 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
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
version: '3.7'
services:
evm1:
image: ghcr.io/sygmaprotocol/indexer-evm1:latest
container_name: evm1
command: ganache-cli --chainId 1337 -d --db data/ --blockTime 2 > /dev/null
logging:
driver: none
ports:
- "8545:8545"
evm2:
image: ghcr.io/sygmaprotocol/indexer-evm2:latest
command: ganache-cli --chainId 1338 -d --db data/ --blockTime 2 > /dev/null
container_name: evm2
logging:
driver: none
ports:
- "8547:8545"
substrate-pallet:
container_name: substrate-pallet
command: ["--pruning=25000"]
image: ghcr.io/sygmaprotocol/indexer-substrate:latest
ports:
- "9944:9944"
- "9933:9933"
logging:
driver: none
mongo1:
image: mongo:6
container_name: mongo1
command: ["--replSet", "my-replica-set", "--bind_ip_all", "--port", "30001"]
volumes:
- ./data/mongo-1:/data/db
ports:
- 30001:30001
logging:
driver: none
mongo2:
image: mongo:6
container_name: mongo2
command: ["--replSet", "my-replica-set", "--bind_ip_all", "--port", "30002"]
volumes:
- ./data/mongo-2:/data/db
ports:
- 30002:30002
logging:
driver: none
mongo3:
image: mongo:6
container_name: mongo3
command: ["--replSet", "my-replica-set", "--bind_ip_all", "--port", "30003"]
volumes:
- ./data/mongo-3:/data/db
ports:
- 30003:30003
logging:
driver: none
mongo-rs-init:
image: mongo:6
container_name: mongo-rs-init
depends_on:
- mongo1
- mongo2
- mongo3
entrypoint: ["replica_set_init.sh"]
restart: on-failure
volumes:
- ./scripts/replica_set_init.sh:/usr/local/bin/replica_set_init.sh:ro
indexer:
build:
context: .
dockerfile: ./Dockerfile
restart: always
environment:
DATABASE_URL: mongodb://mongo1:30001/sygmaprotocol-explorer-indexer?replicaSet=my-replica-set&authSource=admin&retryWrites=true&w=majority
SHARED_CONFIG_URL: https://ipfs.io/ipfs/bafkreiasnla2ya55of6nwm3swjstip4q2ixfa3t6tvixyibclfovxnerte
RPC_URL_CONFIG: '[{"id": 1, "endpoint": "http://evm1:8545"}, {"id": 2, "endpoint": "http://evm2:8545"}, {"id": 3, "endpoint": "ws://substrate-pallet:9944"}]'
RETRY_COUNT: '1'
BACKOFF: '100'
api:
build:
context: .
dockerfile: ./Dockerfile.api
environment:
DATABASE_URL: mongodb://mongo1:30001/sygmaprotocol-explorer-indexer
ports:
- "8000:8000"