Skip to content
Snippets Groups Projects
Commit cee8975b authored by Gilles Filippini's avatar Gilles Filippini Committed by Hugo Trentesaux
Browse files

docker: add DUNITER_PRUNING_PROFILE variable

Values:
* `default`: default duniter pruning configuration
* `archive`: set `--state-pruning archive --blocks-pruning archive`
* `light`: set `--blocks-pruning 14400` (keep one day of blocks history)
parent 1d2bb1b9
No related branches found
No related tags found
1 merge request!132docker: add DUNITER_PRUNING_PROFILE variable
Pipeline #18729 waiting for manual action
......@@ -69,6 +69,7 @@ volumes:
| `DUNITER_VALIDATOR` | Boolean (`true` / `false`) to run the node in validator mode. Configure the polkadot options `--validator --rpc-methods Unsafe`. | `false` |
| `DUNITER_DISABLE_PROMETHEUS` | Boolean to disable the Prometheus endpoint on port 9615. | `false` |
| `DUNITER_DISABLE_TELEMETRY` | Boolean to disable connecting to the Substrate tememetry server. | `false` |
| `DUNITER_PRUNING_PROFILE` | * `default`<br> * `archive`: keep all blocks and state blocks<br> * `light`: keep only last 256 state blocks and last 14400 blocks (one day duration) | `default` |
# Other duniter options
......
......@@ -55,6 +55,21 @@ if [ "$DUNITER_DISABLE_TELEMETRY" = true ]; then
set -- "$@" --no-telemetry
fi
DUNITER_PRUNING_PROFILE="${DUNITER_PRUNING_PROFILE:-default}"
case "$DUNITER_PRUNING_PROFILE" in
default)
;;
archive)
set -- "$@" --state-pruning archive --blocks-pruning archive
;;
light)
set -- "$@" --blocks-pruning 14400
;;
*)
echo "ERROR: ignoring unknown DUNITER_PRUNING_PROFILE value '$DUNITER_PRUNING_PROFILE'" >&2
;;
esac
DUNITER_CHAIN_NAME="${DUNITER_CHAIN_NAME:-dev}"
case "$DUNITER_CHAIN_NAME" in
dev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment