Skip to content

Commit 33c1acb

Browse files
docs: add tilt instructions to README
1 parent 5d5d62f commit 33c1acb

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

README.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,36 @@ Types will need to be regenerated any time the `graphql.schema` is changed.
160160
yarn run codegen
161161
```
162162

163-
### 3. Run
163+
### 3a. Run via [Tilt](https://tilt.dev/)
164+
165+
```bash
166+
# Start tilt
167+
tilt up
168+
169+
# Delete tilt resources
170+
tilt down
171+
```
172+
173+
#### Running against localnet
174+
175+
NOTE: 🚨 The [poktroll](https://github.com/pokt-network/poktroll) localnet includes pocketdex in its tilt environment. 🚨
176+
177+
If you need to run pocketdex against poktroll localnet, but can't use the poktroll repo's tilt environment for whatever reason, update (_but don't commit_) the `indexer_values_path` in the `Tiltfile`:
178+
179+
```diff
180+
load("./tiltfiles/pocketdex.tilt", "pocketdex")
181+
pocketdex("./",
182+
genesis_file_name="testnet.json",
183+
postgres_values_path="./tiltfiles/k8s/postgres/postgres-values.yaml",
184+
pgadmin_values_path="./tiltfiles/k8s/pgadmin/pgadmin-values.yaml",
185+
- indexer_values_path="./tiltfiles/k8s/indexer/dev-testnet-indexer-values.yaml",
186+
+ indexer_values_path="./tiltfiles/k8s/indexer/dev-localnet-indexer-values.yaml",
187+
gql_engine_values_path="./tiltfiles/k8s/gql-engine/dev-gql-engine-values.yaml")
188+
```
189+
190+
Tilt will automatically apply the change on save.
191+
192+
### 3b. Run via docker-compose
164193

165194
Dotenv files will be automatically created after the `yarn install` thanks to the `postinstall` script.
166195
After that, feel free to modify them as you wish.
@@ -215,7 +244,7 @@ Or Stop & clean up (delete postgres data):
215244
yarn run docker:clean:development
216245
```
217246

218-
#### 3.1 Debugging, errors running & building
247+
#### 3b.1 Debugging, errors running & building
219248

220249
If you're hitting errors with the above command, do a nuclear clean of all potential issues:
221250

@@ -227,7 +256,7 @@ docker context use default
227256

228257
Now pick up from the `yarn run docker:build` step above.
229258

230-
#### 3.2 Using a pre-built image
259+
#### 3b.2 Using a pre-built image
231260

232261
If you are unable to build locally, a pre-built image is available on Docker Hub: [bryanchriswhite/pocketdex-subquery-node:latest](https://hub.docker.com/r/bryanchriswhite/pocketdex-subquery-node).
233262

@@ -252,7 +281,7 @@ services:
252281
...
253282
```
254283

255-
#### 3.3 Available Scripts breakdown
284+
#### 3b.3 Available Scripts breakdown
256285

257286
* `preinstall` - Enforces the use of Yarn as the package manager.
258287
* `postinstall` - Executes the `env:prepare` script after the installation process.
@@ -280,6 +309,6 @@ services:
280309
* `docker:stop:<environment>` - Stops all active services for the specified environment without removing them.
281310
* `docker:clean:<environment>` - Stops and removes all services, volumes, and networks for the specified environment.
282311

283-
#### 3.4 Using k8s
312+
### 3c. Using k8s
284313

285314
See the instructions in [docs/kubernetes.md](./docs/kubernetes.md) for deploying using Kubernetes.

0 commit comments

Comments
 (0)