From bfd5f57d592badfc63a10f9aa6cee6796d85c6f1 Mon Sep 17 00:00:00 2001 From: stubbsta Date: Thu, 3 Oct 2024 11:07:50 +0200 Subject: [PATCH] WIP for ad hoc testing --- docker-compose.yml | 14 +++++++++++--- run_nwaku_store_postgres1.sh | 2 +- run_nwaku_store_postgres2.sh | 9 +++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7746526..fa72a84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -93,6 +93,8 @@ services: restart: on-failure labels: com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}' + ports: + - 127.0.0.1:60001:60001 entrypoint: sh environment: - POSTGRES_USER=${POSTGRES_USER:-postgres} @@ -105,13 +107,16 @@ services: postgres1: condition: service_healthy networks: - - simulation + simulation: + ipv4_address: 10.2.0.100 nwaku_store_pg2: image: ${NWAKU_IMAGE:-wakuorg/nwaku:latest} restart: on-failure labels: com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}' + ports: + - 127.0.0.1:60002:60002 entrypoint: sh environment: - POSTGRES_USER=${POSTGRES_USER:-postgres} @@ -121,10 +126,13 @@ services: volumes: - ./run_nwaku_store_postgres2.sh:/opt/run_nwaku_store_postgres2.sh:Z depends_on: - postgres2: + nwaku_store_pg1: + condition: service_started + postgres2: condition: service_healthy networks: - - simulation + simulation: + ipv4_address: 10.2.0.101 # rest-traffic: # image: alrevuelta/rest-traffic:6992bb5 diff --git a/run_nwaku_store_postgres1.sh b/run_nwaku_store_postgres1.sh index cf5b4ff..129655a 100644 --- a/run_nwaku_store_postgres1.sh +++ b/run_nwaku_store_postgres1.sh @@ -36,7 +36,7 @@ exec /usr/bin/wakunode\ --cluster-id=16\ --ports-shift=1\ --store=true\ - --store-message-retention-policy=size:1GB\ + --store-message-retention-policy=size:20MB\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres1:5432/postgres"\ --store-sync=true\ --store-sync-interval=120\ diff --git a/run_nwaku_store_postgres2.sh b/run_nwaku_store_postgres2.sh index c0566f2..562c94a 100644 --- a/run_nwaku_store_postgres2.sh +++ b/run_nwaku_store_postgres2.sh @@ -28,17 +28,18 @@ exec /usr/bin/wakunode\ --dns-discovery=true\ --discv5-discovery=true\ --discv5-enr-auto-update=True\ - --log-level=DEBUG\ + --log-level=TRACE\ --metrics-server=True\ --metrics-server-address=0.0.0.0\ --discv5-bootstrap-node=${BOOTSTRAP_ENR}\ --pubsub-topic=/waku/2/rs/16/32\ --cluster-id=16\ - --ports-shift=1\ + --ports-shift=2\ --store=true\ - --store-message-retention-policy=size:1GB\ + --store-message-retention-policy=size:40MB\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres2:5432/postgres"\ --store-sync=true\ - --store-sync-interval=120\ + --store-sync-interval=80\ --store-sync-range=3600\ + --staticnode=/ip4/10.2.0.100/tcp/60001/p2p/16Uiu2HAm3iFcvPDcYge7JFev3ZRdsiUoYFwxtzGZW1BSoV4b4Gc6\ --nodekey=5978783f8b1a16795032371fff7a526af352d9dca38179af7d71c0122942daa3 \ No newline at end of file