-
Notifications
You must be signed in to change notification settings - Fork 47
/
docker-compose.yml
56 lines (56 loc) · 1.3 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
version: "3"
services:
# Customized geth image for indexer
geth:
image: quay.io/amis/indexer-geth:indexer-1.8.21
ports:
- "30303:30303"
- "8546:8546"
volumes:
- ${GETH_DATA_PATH}:/root/.ethereum
command: "--gcmode=archive --syncmode=full --wsapi \"eth,debug\" --ws --wsaddr 0.0.0.0 --wsport 8546 --wsorigins \"*\""
restart: always
depends_on:
- idx-database
idx-database:
image: mysql:5.7
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
- MYSQL_CHARSET=utf8
- MYSQL_DATABASE=ethdb
volumes:
- ${MYSQL_DATA_PATH}:/var/lib/mysql
idx-migration:
build:
context: ./migration
command: ["rake", "db:migrate"]
restart: on-failure
depends_on:
- idx-database
environment:
- RAILS_ENV=customized
- HOST=idx-database
- PORT=3306
- DATABASE=ethdb
- USERNAME=root
- PASSWORD=my-secret-pw
indexer:
build:
context: .
dockerfile: ./cmd/Dockerfile
command:
- indexer
- --eth
- "ws://geth:8546"
- --functions.erc20token
- --indexer.db.cred.host
- "idx-database"
restart: on-failure
depends_on:
- idx-database
- idx-migration
- geth
volumes:
- ./configs:/configs