forked from kkrt-labs/kakarot-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yaml
158 lines (150 loc) · 4.61 KB
/
docker-compose.prod.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# trunk-ignore-all(yamllint/empty-values)
version: "3.8"
services:
starknet:
image: nethermind/juno:v0.11.1
ports:
- 6060:6060
volumes:
- juno_files:/var/lib/juno
command: >
--pending-poll-interval "1s"
--http
--http-host 0.0.0.0
--http-port 6060
--db-path /var/lib/juno
--eth-node ${ETH_NODE_WS}
--cn-name kakarot-sepolia
--cn-feeder-url https://gateway.kakarot.sw-dev.io/feeder_gateway/
--cn-gateway-url https://gateway.kakarot.sw-dev.io/gateway/
--cn-l1-chain-id 0xaa36a7
--cn-l2-chain-id kkrt
--cn-core-contract-address 0x9DAd05893305352cDd142F79e36bc39393F23770
--cn-unverifiable-range 0,1000000
networks:
- internal
starknet-explorer:
image: public.ecr.aws/o5q6k5w4/stark_compass_explorer:latest
ports:
- 4000:4000
environment:
- PHX_HOST=localhost
- PORT=4000
- RPC_API_HOST=http://host.docker.internal:6060
- TESTNET_RPC_API_HOST=http://host.docker.internal:6060
- SEPOLIA_RPC_API_HOST=http://host.docker.internal:6060
- DISABLE_MAINNET_SYNC=true
- DISABLE_SEPOLIA_SYNC=true
- DATABASE_PATH=ecto://postgres:postgres@starknet-explorer-db:5432/starknet_explorer_dev
- DB_TYPE=postgres
- SECRET_KEY_BASE=JyULoT5cLBifW+XNEuCTVoAb+SaFgQt9j227RN0cKpR3wTsrApGd1HNcgeopemyl
- ENABLE_LISTENER=true
depends_on:
starknet-explorer-db:
condition: service_started
starknet:
condition: service_started
extra_hosts:
- host.docker.internal:172.17.0.1
networks:
- internal
starknet-explorer-db:
image: postgres:15.3
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=starknet_explorer_dev
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- starknet-explorer:/var/lib/postgresql/data/
kakarot-rpc:
image: ghcr.io/kkrt-labs/kakarot-rpc/node:latest
pull_policy: always
ports:
- 3030:3030
environment:
- KAKAROT_RPC_URL=0.0.0.0:3030
- STARKNET_NETWORK=http://starknet:6060
- RUST_LOG=kakarot_rpc=info
- MONGO_CONNECTION_STRING=mongodb://mongo:mongo@mongo:27017
- MONGO_DATABASE_NAME=kakarot-local
# These values are unique to Sepolia Testnet
# They'll need to be manually changed in case the testnet is reset
# To add robustness: parse the `deployments/kakarot-sepolia` folder in `kkrt-labs/kakarot` repo
- KAKAROT_ADDRESS=0x612fb5de32723a19b073b3aba348e48a3d9f51448426d8931694e51db5795e6
- UNINITIALIZED_ACCOUNT_CLASS_HASH=0x1d8b8047e26b484d3f6262d1967217d980d0f2dfc69afa5661492bd5bfe2954
- ACCOUNT_CONTRACT_CLASS_HASH=0x56d311021950bf65ee500426e007b9e3ced0db97f9c1e0d29a9e03d79a9bf6c
restart: on-failure
volumes:
# Mount the indexer code
- indexer_code:/usr/src/indexer
depends_on:
starknet:
condition: service_started
networks:
- internal
apibara-dna:
extends:
file: docker-compose.yaml
service: apibara-dna
command:
- start
- --rpc=http://starknet:6060
- --wait-for-rpc
- --data=/data
### MongoDB with Mongo Express
mongo:
image: mongo:6.0.8
restart: always
ports:
- 27017:27017
volumes:
- mongo_data_prod:/data/db
networks:
- internal
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: mongo
indexer:
image: quay.io/apibara/sink-mongo:0.7.0
command:
- run
- /indexer/src/main.ts
environment:
# Whitelist environment variables
- ALLOW_ENV_FROM_ENV=DEBUG,APIBARA_AUTH_TOKEN,STARTING_BLOCK,STREAM_URL,SINK_TYPE,MONGO_CONNECTION_STRING,MONGO_DATABASE_NAME,STARKNET_NETWORK,KAKAROT_ADDRESS,ALLOW_NET,MONGO_REPLACE_DATA_INSIDE_TRANSACTION
- DEBUG=""
- APIBARA_AUTH_TOKEN=""
- MONGO_CONNECTION_STRING=mongodb://mongo:mongo@mongo:27017
- MONGO_DATABASE_NAME=kakarot-local
- STARTING_BLOCK=0
- STREAM_URL=http://apibara-dna:7171
- SINK_TYPE=mongo
- STARKNET_NETWORK=http://starknet:6060
- ALLOW_NET=
- MONGO_REPLACE_DATA_INSIDE_TRANSACTION=false
- KAKAROT_ADDRESS=0x612fb5de32723a19b073b3aba348e48a3d9f51448426d8931694e51db5795e6
restart: on-failure
volumes:
- indexer_code:/indexer
networks:
- internal
depends_on:
starknet:
condition: service_started
networks:
internal:
driver: bridge
default:
driver: bridge
close:
driver: bridge
volumes:
apibara:
mongo_data_prod:
indexer_code:
pgadmin_data:
juno_files:
starknet-explorer: