chore: Enable external configuration of DB storage size retention policy (#77)
This commit is contained in:
parent
f269a8ed26
commit
89afff4597
|
@ -15,4 +15,5 @@ NWAKU_IMAGE=
|
||||||
NODEKEY=
|
NODEKEY=
|
||||||
DOMAIN=
|
DOMAIN=
|
||||||
EXTRA_ARGS=
|
EXTRA_ARGS=
|
||||||
RLN_RELAY_CONTRACT_ADDRESS=
|
RLN_RELAY_CONTRACT_ADDRESS=
|
||||||
|
STORAGE_SIZE=
|
|
@ -15,6 +15,7 @@ There are multiple environment variables you can configure to modify behaviour o
|
||||||
* `RLN_RELAY_CRED_PASSWORD` - password for encrypting RLN credentials
|
* `RLN_RELAY_CRED_PASSWORD` - password for encrypting RLN credentials
|
||||||
* `EXTRA_ARGS` - this variable allows you to specify additional or overriding CLI option for the Waku node which will be appended to the `wakunode2` command. (e.g. `EXTRA_ARGS="--store=false --max-connections=3000`)
|
* `EXTRA_ARGS` - this variable allows you to specify additional or overriding CLI option for the Waku node which will be appended to the `wakunode2` command. (e.g. `EXTRA_ARGS="--store=false --max-connections=3000`)
|
||||||
* `CERTS_DIR` - allows you to define a path where SSL certificates are/will be stored. It needs to follow the directory structure produced by Certbot in `/etc/letsencrypt`
|
* `CERTS_DIR` - allows you to define a path where SSL certificates are/will be stored. It needs to follow the directory structure produced by Certbot in `/etc/letsencrypt`
|
||||||
|
* `STORATE_SIZE` - overrides the default allowed DB size of waku message storage service. Current default is 1GB. (e.g. `STORAGE_SIZE=2GB` or `STORAGE_SIZE=3500MB`)
|
||||||
|
|
||||||
## Log monitoring and troubleshooting
|
## Log monitoring and troubleshooting
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ services:
|
||||||
RLN_RELAY_CRED_PASSWORD: "${RLN_RELAY_CRED_PASSWORD}"
|
RLN_RELAY_CRED_PASSWORD: "${RLN_RELAY_CRED_PASSWORD}"
|
||||||
ETH_CLIENT_ADDRESS: *eth_client_address
|
ETH_CLIENT_ADDRESS: *eth_client_address
|
||||||
EXTRA_ARGS: ${EXTRA_ARGS}
|
EXTRA_ARGS: ${EXTRA_ARGS}
|
||||||
|
STORAGE_SIZE: ${STORAGE_SIZE}
|
||||||
<<:
|
<<:
|
||||||
- *pg_env
|
- *pg_env
|
||||||
- *rln_env
|
- *rln_env
|
||||||
|
|
|
@ -46,7 +46,6 @@ if [ -n "${NODEKEY}" ]; then
|
||||||
NODEKEY=--nodekey=${NODEKEY}
|
NODEKEY=--nodekey=${NODEKEY}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH:-/keystore/keystore.json}
|
RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH:-/keystore/keystore.json}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,6 +53,12 @@ if [ -n "${RLN_RELAY_CRED_PASSWORD}" ]; then
|
||||||
RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}"
|
RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password="${RLN_RELAY_CRED_PASSWORD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
STORE_RETENTION_POLICY=--store-message-retention-policy=size:1GB}
|
||||||
|
|
||||||
|
if [ -n "${STORAGE_SIZE}" ]; then
|
||||||
|
STORE_RETENTION_POLICY=--store-message-retention-policy=size:"${STORAGE_SIZE}"
|
||||||
|
fi
|
||||||
|
|
||||||
exec /usr/bin/wakunode\
|
exec /usr/bin/wakunode\
|
||||||
--relay=true\
|
--relay=true\
|
||||||
--pubsub-topic=/waku/2/rs/1/0\
|
--pubsub-topic=/waku/2/rs/1/0\
|
||||||
|
@ -88,7 +93,6 @@ exec /usr/bin/wakunode\
|
||||||
--nat=extip:"${MY_EXT_IP}"\
|
--nat=extip:"${MY_EXT_IP}"\
|
||||||
--store=true\
|
--store=true\
|
||||||
--store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\
|
--store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\
|
||||||
--store-message-retention-policy=time:86400\
|
|
||||||
--rln-relay=true\
|
--rln-relay=true\
|
||||||
--rln-relay-dynamic=true\
|
--rln-relay-dynamic=true\
|
||||||
--rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\
|
--rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\
|
||||||
|
@ -98,5 +102,6 @@ exec /usr/bin/wakunode\
|
||||||
${RLN_RELAY_CRED_PASSWORD}\
|
${RLN_RELAY_CRED_PASSWORD}\
|
||||||
${DNS_WSS_CMD}\
|
${DNS_WSS_CMD}\
|
||||||
${NODEKEY}\
|
${NODEKEY}\
|
||||||
|
${STORE_RETENTION_POLICY}\
|
||||||
${EXTRA_ARGS}
|
${EXTRA_ARGS}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue