1
1
### Run docker compose setup locally version ` 89586b190bfe88a3e9cd9d9d0e1025caa0185d94 `
2
+
2
3
1 . Run the ` movement-full-node ` and ` movement-indexer ` locally
4
+
3
5
``` bash
4
6
rm -rf ~ /.movement/* \
5
7
&& docker compose \
@@ -11,7 +13,8 @@ rm -rf ~/.movement/* \
11
13
up
12
14
```
13
15
14
- 2 . in second terminal star the indexer
16
+ 1 . in second terminal star the indexer
17
+
15
18
``` bash
16
19
docker compose \
17
20
--env-file docker/compose/movement-indexer/.env \
@@ -22,9 +25,10 @@ docker compose \
22
25
logs movement-indexer
23
26
```
24
27
25
- ### Run docker compose setup locally version ` 247a02657800d56b36f3c49f8ab01b125e54163a `
28
+ ### Run docker compose setup locally version ` 247a02657800d56b36f3c49f8ab01b125e54163a `
26
29
27
30
Run the ` movement-full-node ` , ` movement-indexer ` and ` movement-hasura ` locally
31
+
28
32
``` bash
29
33
rm -rf ~ /.movement/* \
30
34
; docker volume rm $( docker volume ls -q) \
@@ -39,7 +43,8 @@ rm -rf ~/.movement/* \
39
43
40
44
### Connect an indexer running locally to a movement-node running in AWS
41
45
42
- 1 . In one terminal start port forwarding from localhost to suzka-node running in aws
46
+ 1 . In one terminal start port forwarding from localhost to movement-node running in aws
47
+
43
48
``` bash
44
49
INSTANCE_ID=i-0a617bd< snip>
45
50
aws ssm start-session \
@@ -50,20 +55,23 @@ aws ssm start-session \
50
55
```
51
56
52
57
test
58
+
53
59
``` bash
54
60
# brew install grpcurl
55
61
grpcurl -plaintext localhost:30734 list aptos.indexer.v1.RawData
56
62
```
57
63
58
- 2 . Make sure that all other containers are stop
64
+ 2 . Make sure that all other containers are stoped
65
+
59
66
``` bash
60
67
docker ps
61
68
```
62
69
63
- 3 . Clean previous runs and create required ` config.json ` by the indexer in the
70
+ 3 . Clean previous runs and create required ` config.json ` by the indexer in the
64
71
proper location.
65
72
66
73
In another terminal
74
+
67
75
``` bash
68
76
69
77
GIT_ROOT=$( git rev-parse --show-toplevel)
@@ -81,6 +89,7 @@ docker rm -f $(docker ps -aq) \
81
89
```
82
90
83
91
logs
92
+
84
93
``` bash
85
94
docker compose \
86
95
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -89,6 +98,7 @@ docker compose \
89
98
```
90
99
91
100
attach to movement-indexer container
101
+
92
102
``` bash
93
103
docker compose \
94
104
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -97,6 +107,7 @@ docker compose \
97
107
```
98
108
99
109
check if indexer can reach remote rpc
110
+
100
111
``` bash
101
112
docker compose \
102
113
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -105,24 +116,29 @@ docker compose \
105
116
```
106
117
107
118
check size of local DB on disk
119
+
108
120
``` bash
109
121
docker run --rm -v movement-indexer_postgres_data:/volume alpine sh -c " du -sh /volume"
110
122
```
111
123
112
124
### Connect to postgres db
113
125
114
126
Attach to the postgres container
127
+
115
128
``` bash
116
129
docker exec -it postgres bash
117
130
```
118
131
119
132
Use ` psql ` to connect to the database. Password is ` postgres `
133
+
120
134
``` bash
121
135
psql --username=postgres --dbname=postgres --host=127.0.0.1 --password
122
136
```
123
137
124
138
### Hasura
139
+
125
140
Docs:
141
+
126
142
- https://hasura.io/docs/2.0/auth/quickstart/
127
143
- https://hasura.io/docs/2.0/auth/quickstart/#step-2-create-a-user-role
128
144
- https://hasura.io/docs/2.0/auth/authentication/unauthenticated-access/
@@ -144,9 +160,9 @@ A manual second step is needed to add a header `Authorization Bearer tokenValue`
144
160
(stored in 1password)
145
161
146
162
#### Update hasura metadata
147
- To update the Hasura metadata use this command in the movement root folder:
148
163
164
+ To update the Hasura metadata use this command in the movement root folder:
149
165
150
166
``` bash
151
167
INDEXER_API_URL=https://indexer.testnet.porto.movementnetwork.xyz HASURA_ADMIN_AUTH_KEY=< auth key> POSTGRES_DB_URL=postgres://< login> :< password> @< host> :5432/postgres cargo run -p movement-indexer-service --bin load_metadata
152
- ```
168
+ ```
0 commit comments