Skip to content

Commit

Permalink
Running locally, but still trying to figure out usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed Jul 28, 2024
1 parent ed6df45 commit 4d4079f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ To learn more about SubQuery, [see their docs](https://academy.subquery.network)

- [Docs](#docs)
- [Getting Started](#getting-started)
- [tl;dr If this is not your first time](#tldr-if-this-is-not-your-first-time)
- [tl;dr local development (if not your first time)](#tldr-local-development-if-not-your-first-time)
- [1. Ensure submodules are updated](#1-ensure-submodules-are-updated)
- [2. Install dependencies](#2-install-dependencies)
- [3. Generate types](#3-generate-types)
- [4. Run](#4-run)
- [Localnet ONLY](#localnet-only)
- [4.1 Errors running \& building](#41-errors-running--building)
- [4.1 Debugging, errors running \& building](#41-debugging-errors-running--building)
- [4.2 Using a pre-built image](#42-using-a-pre-built-image)
- [4.3 Available Scripts breakdown](#43-available-scripts-breakdown)
- [DB Migrations](#db-migrations)
Expand All @@ -44,26 +44,19 @@ See the [docs](./docs/introduction.md) directory.

## Getting Started

### tl;dr If this is not your first time
### tl;dr local development (if not your first time)

Run the following:

```bash
yarn install
yarn run codegen
docker context use default
docker context use default # Optional
yarn run docker:build:development
yarn poktroll:proxy:start
yarn run docker:start:development
```

Debugging to get a clean build:

```bash
yarn cache clean
yarn vendor:clean
docker builder prune --all
```


### 1. Ensure submodules are updated

```shell
Expand Down Expand Up @@ -139,15 +132,18 @@ Or Stop & clean up (delete postgres data):
yarn run docker:clean:development
```

#### 4.1 Errors running & building
#### 4.1 Debugging, errors running & building

If you're hitting errors with the above command, try cleaning your cache:
If you're hitting errors with the above command, do a nuclear clean of all potential issues:

```bash
yarn cache clean
yarn vendor:clean
docker builder prune --all
docker context use default
```

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

#### 4.2 Using a pre-built image

Expand Down
7 changes: 6 additions & 1 deletion docker/dev-node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ ENV CI=$CI

# typescript is added here because is wrongly used on some of the workspaces, just by the name
# without the use of npm exec, yarn exec or any other to ensure they are looking into the node_modules
RUN apt-get update && apt-get install -y tree git postgresql-client tini curl jq yq && npm i -g typescript
RUN apt-get update \
&& apt-get install -y tree git postgresql-client tini curl jq yq \
# The following was necessary to install in order to add support for building
# the docker container on an M1 chip (i.e. ARM64)
make build-essential pkg-config python3 libusb-1.0-0-dev libudev-dev \
&& npm i -g typescript

WORKDIR /app

Expand Down

0 comments on commit 4d4079f

Please sign in to comment.