Skip to content

Commit

Permalink
add flush interval
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjizhan committed Apr 6, 2024
1 parent dff2627 commit ee3f078
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
# -------------------------------- #
postgres:
image: postgres:12-alpine
container_name: db
ports:
- 5432:5432
environment:
Expand All @@ -20,6 +21,7 @@ services:
context: .
dockerfile: docker/subql-node.Dockerfile
target: subql-node
container_name: subql-node
depends_on:
yarn-install:
condition: service_completed_successfully
Expand All @@ -46,9 +48,17 @@ services:
- --log-level=debug
- --unsafe
- --disable-historical
- --batch-size=10
- --store-flush-interval=1 # has to set this for instant sealing, otherwise some data will stuck in cache
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
interval: 2s
timeout: 5s
retries: 100

graphql-engine:
image: subquerynetwork/subql-query:v2.10.0
container_name: subql-query
ports:
- 3001:3001
depends_on:
Expand Down
28 changes: 25 additions & 3 deletions packages/evm-subql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
version: '3.9'

services:
mandala-node:
image: ghcr.io/acalanetwork/mandala-node:sha-89ef1e5
ports:
- 9944:9944
healthcheck:
test: "curl --fail -X POST -H \"Content-Type: application/json\" http://localhost:9944 -d \"{\"jsonrpc\": \"2.0\" }\" || exit 1"
interval: 2s
retries: 100
start_period: 3s
command:
- --dev
# - -lruntime=debug
# - -levm=debug
- --rpc-external
- --rpc-cors=all
- --rpc-methods=unsafe
- --pruning=archive
- --instant-sealing
- --tmp

postgres:
image: postgres:12-alpine
container_name: postgres
Expand All @@ -10,7 +30,7 @@ services:
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
interval: 2s
timeout: 5s
retries: 5

Expand All @@ -19,6 +39,8 @@ services:
depends_on:
postgres:
condition: service_healthy
mandala-node:
condition: service_healthy
ports:
- 3000:3000
restart: always
Expand All @@ -32,8 +54,8 @@ services:
- ./:/app
command:
- ${SUB_COMMAND:-} # set SUB_COMMAND env variable to "test" to run tests
- -f=/app/project-acala.yaml
- --network-endpoint=wss://acala-rpc.aca-api.network
- -f=/app/project.yaml
- --network-endpoint=ws://mandala-node:9944
- --db-schema=acala_evm
- --log-level=debug
- --unsafe
Expand Down

0 comments on commit ee3f078

Please sign in to comment.