Skip to content

Commit

Permalink
Merge pull request #1063 from autonomys/chore/simplify-indexers-setup
Browse files Browse the repository at this point in the history
Simplify indexers setup
  • Loading branch information
marc-aurele-besner authored Jan 16, 2025
2 parents 327c068 + 3a0f599 commit 2f5987c
Show file tree
Hide file tree
Showing 104 changed files with 2,610 additions and 6,391 deletions.
20 changes: 16 additions & 4 deletions .vscode/astral.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@
"path": "../indexers"
},
{
"name": "Indexer - Mainnet",
"path": "../indexers/mainnet"
"name": "Indexer - Consensus",
"path": "../indexers/consensus"
},
{
"name": "Indexer - Testnet Taurus",
"path": "../indexers/taurus"
"name": "Indexer - Leaderboard",
"path": "../indexers/leaderboard"
},
{
"name": "Indexer - Files",
"path": "../indexers/files"
},
{
"name": "Indexer - Staking",
"path": "../indexers/staking"
},
{
"name": "Indexer - API",
"path": "../indexers/api"
},
{
"name": "Indexer - Taskboard",
Expand Down
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ services:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
volumes:
- ./indexers/${NETWORK_ID}/consensus:/${NETWORK_ID}/consensus
- ./indexers/consensus:/consensus
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/${NETWORK_ID}/consensus
- -f=/consensus
- --db-schema=consensus
- --workers=4
- --unsafe
Expand Down Expand Up @@ -257,10 +257,10 @@ services:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
volumes:
- ./indexers/${NETWORK_ID}/leaderboard:/${NETWORK_ID}/leaderboard
- ./indexers/leaderboard:/leaderboard
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/${NETWORK_ID}/leaderboard
- -f=/leaderboard
- --db-schema=leaderboard
- --workers=1
- --batch-size=100
Expand Down Expand Up @@ -295,10 +295,10 @@ services:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
volumes:
- ./indexers/${NETWORK_ID}/staking:/${NETWORK_ID}/staking
- ./indexers/staking:/staking
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/${NETWORK_ID}/staking
- -f=/staking
- --db-schema=staking
- --workers=1
- --unsafe
Expand Down Expand Up @@ -330,10 +330,10 @@ services:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
volumes:
- ./indexers/${NETWORK_ID}/files:/${NETWORK_ID}/files
- ./indexers/files:/files
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/${NETWORK_ID}/files
- -f=/files
- --db-schema=files
- --workers=1
- --unsafe
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"include": [
"src/**/*",
"../../node_modules/@subql/types-core/dist/global.d.ts",
"../../node_modules/@subql/types/dist/global.d.ts"
"../node_modules/@subql/types-core/dist/global.d.d.ts",
"../node_modules/@subql/types/dist/global.d.ts"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"include": [
"src/**/*",
"../../node_modules/@subql/types-core/dist/global.d.ts",
"../../node_modules/@subql/types/dist/global.d.ts"
"../node_modules/@subql/types-core/dist/global.d.d.ts",
"../node_modules/@subql/types/dist/global.d.ts"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"include": [
"src/**/*",
"../../node_modules/@subql/types-core/dist/global.d.ts",
"../../node_modules/@subql/types/dist/global.d.ts"
"../node_modules/@subql/types-core/dist/global.d.ts",
"../node_modules/@subql/types/dist/global.d.ts"
]
}
2 changes: 1 addition & 1 deletion indexers/lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.0",
"packages": ["mainnet/*", "taurus/*", "db", "taskboard"],
"packages": ["*"],
"npmClient": "yarn"
}
68 changes: 0 additions & 68 deletions indexers/mainnet/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions indexers/mainnet/consensus/tsconfig.json

This file was deleted.

20 changes: 0 additions & 20 deletions indexers/mainnet/files/tsconfig.json

This file was deleted.

4 changes: 0 additions & 4 deletions indexers/mainnet/yarn.lock

This file was deleted.

7 changes: 1 addition & 6 deletions indexers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
"private": true,
"main": "index.js",
"license": "MIT",
"workspaces": [
"mainnet/*",
"taurus/*",
"db",
"taskboard"
],
"workspaces": ["*"],
"scripts": {
"postinstall": "git submodule update --init --recursive",
"bootstrap": "lerna run bootstrap",
Expand Down
18 changes: 0 additions & 18 deletions indexers/patch.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"include": [
"src/**/*",
"../../node_modules/@subql/types-core/dist/global.d.ts",
"../../node_modules/@subql/types/dist/global.d.ts"
"../node_modules/@subql/types-core/dist/global.d.ts",
"../node_modules/@subql/types/dist/global.d.ts"
]
}
68 changes: 0 additions & 68 deletions indexers/taurus/README.md

This file was deleted.

Loading

0 comments on commit 2f5987c

Please sign in to comment.