-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0899402
Showing
43 changed files
with
25,299 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,4 @@ | ||
/.git | ||
/node_modules | ||
/lib | ||
/*Versions.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,5 @@ | ||
DB_NAME=squid | ||
DB_PORT=23798 | ||
GQL_PORT=4350 | ||
# wss or endpoint to an Eth mainnet archive node | ||
RPC_ENDPOINT=https://rpc.ankr.com/eth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,7 @@ | ||
/node_modules | ||
/lib | ||
|
||
/**Versions.json | ||
|
||
# IDE files | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,42 @@ | ||
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
github: | ||
prebuilds: | ||
# enable for the master/default branch (defaults to true) | ||
master: true | ||
# enable for all branches in this repo (defaults to false) | ||
branches: false | ||
# enable for pull requests coming from this repo (defaults to true) | ||
pullRequests: true | ||
# add a check to pull requests (defaults to true) | ||
addCheck: true | ||
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false) | ||
addComment: false | ||
|
||
tasks: | ||
- init: | | ||
npm i | ||
npm i -g @subsquid/cli | ||
docker compose pull | ||
gp sync-done setup | ||
- name: DB | ||
command: | | ||
gp sync-await setup | ||
sqd up | ||
- name: GraphQL API | ||
command: | | ||
gp sync-await setup | ||
sqd serve | ||
- command: | | ||
gp ports await 4350 | ||
gp preview $(gp url 4350)/graphql | ||
- name: Squid procesor | ||
command: | | ||
gp open src/processor.ts | ||
gp sync-await setup | ||
sqd build | ||
gp ports await 23798 | ||
sqd process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,40 @@ | ||
FROM node:19-alpine AS node | ||
|
||
FROM node AS node-with-gyp | ||
RUN apk add g make python3 | ||
|
||
FROM node-with-gyp AS builder | ||
WORKDIR /squid | ||
ADD package.json . | ||
ADD package-lock.json . | ||
RUN npm ci | ||
ADD tsconfig.json . | ||
ADD src src | ||
RUN npm run build | ||
|
||
FROM node-with-gyp AS deps | ||
WORKDIR /squid | ||
ADD package.json . | ||
ADD package-lock.json . | ||
RUN npm ci --production | ||
|
||
FROM node AS squid | ||
WORKDIR /squid | ||
COPY --from=deps /squid/package.json . | ||
COPY --from=deps /squid/package-lock.json . | ||
COPY --from=deps /squid/node_modules node_modules | ||
COPY --from=builder /squid/lib lib | ||
ADD db db | ||
ADD schema.graphql . | ||
# TODO: use shorter PROMETHEUS_PORT | ||
ENV PROCESSOR_PROMETHEUS_PORT 3000 | ||
EXPOSE 3000 | ||
EXPOSE 4000 | ||
|
||
|
||
FROM squid AS processor | ||
CMD ["npm", "run", "squid-etl:start"] | ||
|
||
|
||
FROM squid AS query-node | ||
CMD ["npm", "run", "squid-api:start"] |
Oops, something went wrong.