forked from kkrt-labs/kakarot-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.staging.yaml
153 lines (145 loc) · 4.5 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
# trunk-ignore-all(yamllint/empty-values)
version: "3.8"
services:
starknet:
image: nethermind/juno:v0.11.1
ports:
- 6060:6060
volumes:
- ${HOME}/code/kkrt-labs/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/
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/starknet-sepolia` folder in `kkrt-labs/kakarot` repo
- KAKAROT_ADDRESS=0x464f7e37179d2f93ea208795bdb2d0912e8257f6fb5f67ae2559251523aee19
- UNINITIALIZED_ACCOUNT_CLASS_HASH=0x1d8b8047e26b484d3f6262d1967217d980d0f2dfc69afa5661492bd5bfe2954
- ACCOUNT_CONTRACT_CLASS_HASH=0x56d311021950bf65ee500426e007b9e3ced0db97f9c1e0d29a9e03d79a9bf6c
- MAX_FELTS_IN_CALLDATA=22500
restart: on-failure
volumes:
# Mount the indexer code
- indexer_code:/usr/src/indexer
depends_on:
starknet:
condition: service_started
networks:
- internal_staging
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_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.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=0x464f7e37179d2f93ea208795bdb2d0912e8257f6fb5f67ae2559251523aee19
restart: on-failure
volumes:
- indexer_code:/indexer
networks:
- internal_staging
depends_on:
starknet:
condition: service_started
networks:
internal_staging:
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: