forked from kkrt-labs/kakarot-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.staging.yaml
208 lines (198 loc) · 6.3 KB
/
docker-compose.staging.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
services:
starknet:
image: nethermind/juno:v0.12.2
ports:
- 6060:6060
volumes:
- $HOME/snapshots/juno_sepolia:/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:?} --network sepolia
networks:
- internal_staging
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_staging:6060
- TESTNET_RPC_API_HOST=http://host.docker.internal_staging:6060
- SEPOLIA_RPC_API_HOST=http://host.docker.internal_staging: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_staging:172.17.0.1
networks:
- internal_staging
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_staging:/var/lib/postgresql/data/
postgres:
image: postgres:13
environment:
POSTGRES_USER: blockscout
POSTGRES_PASSWORD: postgres
POSTGRES_DB: blockscout
networks:
- internal_staging
volumes:
- postgres_data_staging:/var/lib/postgresql/data
redis:
image: redis:6
command: redis-server --save 60 1 --loglevel warning
networks:
- internal_staging
volumes:
- redis_data_staging:/data
blockscout:
image: blockscout/blockscout:latest
environment:
DATABASE_URL: postgres://blockscout:postgres@postgres:5432/blockscout
DATABASE_SSL: "false"
DATABASE_POOL_SIZE: 10
DATABASE_TIMEOUT: 5000
ECTO_USE_SSL: "false"
BLOCKSCOUT_HOST: 0.0.0.0
PORT: 4000
APP_NAME: Blockscout
ETHEREUM_JSONRPC_VARIANT: geth
ETHEREUM_JSONRPC_HTTP_URL: http://kakarot-rpc:3030
ETHEREUM_JSONRPC_TRACE_URL: http://kakarot-rpc:3030
ports:
- 4001:4000
networks:
- internal_staging
command:
[
/bin/sh,
-c,
bin/blockscout eval "Elixir.Explorer.ReleaseTasks.create_and_migrate()"
&& bin/blockscout start,
]
depends_on:
- postgres
- redis
kakarot-rpc:
image: ghcr.io/kkrt-labs/kakarot-rpc/node:v0.7.6
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/starknet-sepolia` folder in `kkrt-labs/kakarot` repo
- KAKAROT_ADDRESS=0x48fc2888aad166304e63af35a48e00e32da9831e49fe30a22148fdecdb7e66f
- UNINITIALIZED_ACCOUNT_CLASS_HASH=0x7b2de5e73ff7eb338d76c967dd5aa3f3004574d326b8c1402bb819d4983b8b6
- ACCOUNT_CONTRACT_CLASS_HASH=0x25d4b4889979f3df8171991f6a0163b42b756daebf313bcd0dec74cacf903f9
- MAX_FELTS_IN_CALLDATA=30000
- MAX_LOGS=10000
- WHITE_LISTED_EIP_155_TRANSACTION_HASHES=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26,0xb6274b80bc7cda162df89894c7748a5cb7ba2eaa6004183c41a1837c3b072f1e,0x07471adfe8f4ec553c1199f495be97fc8be8e0626ae307281c22534460184ed1,0xb95343413e459a0f97461812111254163ae53467855c0d73e0f1e7c5b8442fa3
- RELAYER_PRIVATE_KEY=${RELAYERS_PRIVATE_KEY:?}
- RELAYERS_ADDRESSES=${RELAYERS_ADDRESSES:?}
restart: on-failure
volumes:
# Mount the indexer code
- indexer_code_staging:/usr/src/indexer
depends_on:
starknet:
condition: service_started
networks:
- internal_staging
apibara-dna:
image: quay.io/apibara/starknet:1.6.0
command:
- start
- --rpc=http://starknet:6060
- --wait-for-rpc
- --data=/data
- --head-refresh-interval-ms=1000
ports:
- 7171:7171
volumes:
- apibara_staging:/data
networks:
- internal_staging
restart: on-failure
### MongoDB with Mongo Express
mongo:
image: mongo:6.0.8
restart: always
ports:
- 27017:27017
volumes:
- mongo_data_staging:/data/db
networks:
- internal_staging
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: mongo
indexer:
image: quay.io/apibara/sink-mongo:0.9.2
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,DEFAULT_BLOCK_GAS_LIMIT
- 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=0x48fc2888aad166304e63af35a48e00e32da9831e49fe30a22148fdecdb7e66f
- DEFAULT_BLOCK_GAS_LIMIT=7000000
restart: on-failure
volumes:
- indexer_code_staging:/indexer
networks:
- internal_staging
depends_on:
starknet:
condition: service_started
networks:
internal_staging:
driver: bridge
internal:
driver: bridge
default:
driver: bridge
close:
driver: bridge
volumes:
apibara_staging:
mongo_data_staging:
indexer_code_staging:
pgadmin_data_staging:
starknet_explorer_staging:
juno_files_staging:
postgres_data_staging:
redis_data_staging: