Skip to content

Commit 6f0222a

Browse files
authored
Refactor Development Tooling (Tilt) (#57)
- Replace all the tooling with docker compose in favor of a full integration with Tilt. - Replace helm chart with kustomize which allow to be used as base for a production environment. - Allow fast turn on for any network: mainnet, beta, alpha or localnet - Allow easy overwrite of critical configurations with `.env` file
1 parent 0a85358 commit 6f0222a

File tree

99 files changed

+1328
-3598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1328
-3598
lines changed

.env.sample

Lines changed: 42 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,42 @@
1-
PLATFORM=linux/amd64
2-
#PLATFORM=linux/arm64
3-
NODE_OPTIONS=--max-old-space-size=4096
4-
5-
# Postgres
6-
POSTGRES_USER=postgres
7-
POSTGRES_PASSWORD=postgres
8-
POSTGRES_DB=postgres
9-
10-
# Pgadmin4
11-
# NOTE: if you modify POSTGRES_USER/PASSWORD/DB then auto-imported server will not match and you need to setup
12-
# your own with the modified values on the pgadmin website after first login.
13-
PGADMIN_DEFAULT_EMAIL=[email protected]
14-
PGADMIN_DEFAULT_PASSWORD=admin
15-
PGADMIN_LISTEN_PORT=5050
16-
17-
# Subquery node options
18-
BATCH_SIZE=100
19-
# project.yaml tune on runtime
20-
START_BLOCK=1
21-
22-
# Ref: https://academy.subquery.network/indexer/run_publish/references.html#subql-cli
23-
SUBQUERY_NODE_EXTRA_PARAMS=""
24-
25-
# Check docs to see what else you can set here:
26-
# Ref: https://academy.subquery.network/indexer/run_publish/references.html#subql-query
27-
SUBQUERY_GRAPHQL_EXTRA_PARAMS=
28-
29-
# Localnet
30-
# DB_SCHEMA=localnet
31-
# CHAIN_ID=poktroll
32-
# ENDPOINT=http://proxy:26657
33-
# IMPORTANT: This require you copy genesis file into pocketdex at root as genesis.json which is tracked on .gitignore
34-
# Also uncomment docker-compose.development.yaml `./genesis.json:/app/genesis.json`
35-
# POCKETDEX_GENESIS=/app/genesis.json
36-
37-
# Testnet Beta
38-
DB_SCHEMA=testnet_beta
39-
CHAIN_ID=pocket-beta
40-
ENDPOINT=https://shannon-testnet-grove-rpc.beta.poktroll.com
41-
POCKETDEX_GENESIS=https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/refs/heads/master/shannon/testnet-beta/genesis.json
42-
43-
# Testnet Alpha
44-
# DB_SCHEMA=testnet_alpha
45-
# CHAIN_ID=poktroll
46-
# ENDPOINT=https://shannon-testnet-grove-rpc.alpha.poktroll.com
47-
# POCKETDEX_GENESIS=https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/refs/heads/master/shannon/testnet-alpha/genesis.json
48-
49-
# Subquery Graphql Engine
50-
SUBQUERY_GRAPHQL_ENGINE_VERSION=latest
51-
SUBQUERY_GRAPHQL_ENGINE_PORT=3001
52-
53-
# Pocketdex exclusive
54-
POCKETDEX_DB_BATCH_SIZE=5000
55-
POCKETDEX_DB_PAGE_LIMIT=5000
56-
1+
#####################################################################
2+
# Network selector - pocketdex came with mainnet, beta and alpha
3+
# ready to use with Grove public RPCs
4+
#####################################################################
5+
6+
#NETWORK=mainnet
7+
8+
# For localnet it expect to be running on same poktroll localnet
9+
# which can be turn on with `make localnet_up` on poktroll repository
10+
# But alternative you can uncomment ENDPOINT and point to an external fullnode using http://IP:PORT to the RPC
11+
12+
#####################################################################
13+
# PgAdmin email and password
14+
#####################################################################
15+
16+
#PGADMIN_ENABLED=yes
17+
18+
#PGADMIN_PASSWORD=pocketdex
19+
20+
#####################################################################
21+
# Only for used when NETWORK=localnet
22+
#####################################################################
23+
24+
#GENESIS_PATH=genesis.json
25+
26+
#####################################################################
27+
# All this allow on the fly overides without modify kustomize files.
28+
#####################################################################
29+
30+
#NODE_OPTIONS=--max-old-space-size=16384
31+
#CHAIN_ID=
32+
#ENDPOINT=http://your-full-node-ip:26657
33+
#BATCH_SIZE=10
34+
#START_BLOCK=1
35+
#POCKETDEX_DB_BATCH_SIZE=10000
36+
#POCKETDEX_DB_PAGE_LIMIT=10000
37+
#POCKETDEX_DB_BULK_WRITE_CONCURRENCY=10
38+
#PG_POOL_MIN=50
39+
#PG_POOL_MAX=75
40+
#PG_POOL_ACQUIRE=5000
41+
#PG_POOL_IDLE=10000
42+
#PG_POOL_EVICT=15000

.github/workflows/ci-docker.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,9 @@ jobs:
3434
uses: docker/[email protected]
3535
if: ${{ inputs.env == 'production' }}
3636
with:
37-
file: docker/node.dockerfile
38-
cache-from: type=gha
39-
cache-to: type=gha,mode=min
40-
platforms: ${{ inputs.platform }}
41-
42-
# development mode
43-
- name: Build Development
44-
uses: docker/[email protected]
45-
if: ${{ inputs.env != 'production' }}
46-
with:
47-
file: docker/dev-node.dockerfile
37+
file: tilt/docker/indexer.dockerfile
4838
cache-from: type=gha
4939
cache-to: type=gha,mode=min
40+
build-args: |
41+
BUILD_MODE=production
5042
platforms: ${{ inputs.platform }}

0 commit comments

Comments
 (0)