Skip to content

Commit 86ae35c

Browse files
author
2075
committed
feat(graphql): update graphql frontend submodule
1 parent a2273d5 commit 86ae35c

File tree

5 files changed

+43
-59
lines changed

5 files changed

+43
-59
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ GQL_SECRET=i-am-not-secure
1616
# frontends
1717
DB_ADMIN_PORT=18081
1818
FRONTEND_PORT=18888
19+
#
20+
GF_PORT=13000
1921
GF_ADMIN_USER=hello
2022
GF_ADMIN_PASS=stranger

docker-compose.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,6 @@ version: '3.4'
88

99
services:
1010

11-
# grafana:
12-
# image: grafana/grafana:latest
13-
# container_name: grafana
14-
# volumes:
15-
# - ./data/grafana/data:/var/lib/grafana
16-
# - ./data/grafana/provisioning:/etc/grafana/provisioning
17-
# environment:
18-
# - GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
19-
# - GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASS}
20-
# - GF_USERS_ALLOW_SIGN_UP=false
21-
# restart: unless-stopped
22-
# ports:
23-
# - ${GF_PORT}:3000
24-
# networks:
25-
# - backend
26-
# - frontend
27-
# labels:
28-
# org.label-schema.group: "monitoring"
29-
3011
#
3112
# P O L K A D O T
3213
#
@@ -131,6 +112,8 @@ services:
131112
- frontend
132113
- backend
133114

115+
# db admin
116+
134117
# adminer:
135118
# image: adminer
136119
# container_name: adminer
@@ -140,6 +123,27 @@ services:
140123
# links:
141124
# - postgres:postgres
142125

126+
# monitoring
127+
128+
# grafana:
129+
# image: grafana/grafana:latest
130+
# container_name: grafana
131+
# volumes:
132+
# - ./data/grafana/data:/var/lib/grafana
133+
# - ./data/grafana/provisioning:/etc/grafana/provisioning
134+
# environment:
135+
# - GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
136+
# - GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASS}
137+
# - GF_USERS_ALLOW_SIGN_UP=false
138+
# restart: unless-stopped
139+
# ports:
140+
# - ${GF_PORT}:3000
141+
# networks:
142+
# - backend
143+
# - frontend
144+
# labels:
145+
# org.label-schema.group: "monitoring"
146+
143147
networks:
144148
backend:
145149
frontend:

makefile

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,18 @@ init:
66
mkdir -p data
77
cp .env.example .env
88

9-
#
10-
# A R C H I V E R
11-
#
12-
13-
build:
14-
cd packages/substrate-archive && git pull && cd ../../
15-
START=date
16-
RUSTC_WRAPPER=/usr/local/bin/sccache \
17-
cargo build \
18-
--manifest-path ./packages/substrate-archive/polkadot-archive/Cargo.toml \
19-
--release
20-
mkdir -p ./bin
21-
cp ./packages/substrate-archive/target/release/polkadot-archive ./bin
22-
echo $START
23-
date
24-
25-
build-substrate:
26-
cd packages/substrate-archive && git pull && cd ../../
27-
START=date
28-
RUSTC_WRAPPER=/usr/local/bin/sccache \
29-
cargo build \
30-
--manifest-path ./packages/substrate-archive/node-template-archive/Cargo.toml \
31-
--release
32-
mkdir -p ./bin
33-
cp ./packages/substrate-archive/target/release/node-template-archive ./bin
34-
echo ${START}
35-
date
36-
37-
run:
38-
./bin/polkadot-archive --chain westend --config config/polkadot-westend.toml
39-
40-
run-substrate:
41-
./bin/node-template-archive -vv --config config/substrate.toml --spec config/substrate-dev.json
42-
439
#
4410
# D O C K E R
4511
#
4612

47-
up:
13+
run:
4814
docker-compose up --remove-orphans
4915

5016
down:
5117
docker-compose down
5218

5319
reset:
54-
rm -rf ./data && mkdir -p ./data
20+
rm -rf ./data/pg
21+
rm -rf ./data/polkadot
22+
rm -rf ./data/substrate
23+
rm -rf ./data/grafana

readme.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,25 @@ Get started:
2222
5. on the data tab, add all untracked items
2323
6. have phun in graphiql
2424

25+
## Frontend
26+
27+
An example app has been created in packages/substrate-graph-frontend:
28+
`cd ./packages/substrate-graph-frontend && yarn`
29+
`yarn start`
30+
31+
if everything runs smoothly, you will see a graphql subscription rendering into a block number and a small table showing recent blocks and contents.
32+
2533
## Status
2634

2735
- [X] add polkadot
2836
- [X] add custom substrate nodes (substrate node template)
2937
- [X] add config examples
3038
- [X] add docker-compose
31-
- [ ] add load balancer
39+
- [X] add subscriptions
40+
- [X] add frontend example
3241
- [ ] add monitoring dashboard
33-
- [ ] add subscriptions
34-
- [ ] add frontend example
42+
- [ ] add load balancer
43+
- [ ] kubernetes / helm chart
3544

3645
## Support us
3746

0 commit comments

Comments
 (0)