Skip to content
Snippets Groups Projects
Commit 679f2235 authored by Gilles Filippini's avatar Gilles Filippini
Browse files

docker: variable 'DUNITER_MAX_OLD_SPACE_SIZE'

To enable the undocumented `--max-old-space-size` duniter option which
is passed to the 'node' command.

Example:
  - DUNITER_MAX_OLD_SPACE_SIZE=8192
parent 03acf3e9
No related branches found
No related tags found
1 merge request!1419docker: variable 'DUNITER_MAX_OLD_SPACE_SIZE'
Pipeline #25258 passed
...@@ -17,6 +17,7 @@ profile_default=$home/duniter_default ...@@ -17,6 +17,7 @@ profile_default=$home/duniter_default
manual_config="$(boolean "${DUNITER_MANUAL_CONFIG:-false}")" manual_config="$(boolean "${DUNITER_MANUAL_CONFIG:-false}")"
auto_sync="$(boolean "${DUNITER_AUTO_SYNC:-false}")" auto_sync="$(boolean "${DUNITER_AUTO_SYNC:-false}")"
DUNITER_PEER_HOST="${DUNITER_PEER_HOST:-${DUNITER_SYNC_HOST:-}}" DUNITER_PEER_HOST="${DUNITER_PEER_HOST:-${DUNITER_SYNC_HOST:-}}"
MAX_OLD_SPACE_SIZE=${DUNITER_MAX_OLD_SPACE_SIZE:+--max-old-space-size $DUNITER_MAX_OLD_SPACE_SIZE}
# Create default profile path # Create default profile path
mkdir -p "$home/duniter_default" mkdir -p "$home/duniter_default"
...@@ -100,7 +101,7 @@ if [ "$auto_sync" = true ]; then ...@@ -100,7 +101,7 @@ if [ "$auto_sync" = true ]; then
echo "DUNITER_SYNC_HOST undefined. Can't start synchronization!" echo "DUNITER_SYNC_HOST undefined. Can't start synchronization!"
else else
echo "Starting synchronization..." echo "Starting synchronization..."
/usr/bin/duniter sync "$DUNITER_SYNC_HOST" --no-interactive /usr/bin/duniter $MAX_OLD_SPACE_SIZE sync "$DUNITER_SYNC_HOST" --no-interactive
fi fi
fi fi
fi fi
...@@ -115,7 +116,9 @@ fi ...@@ -115,7 +116,9 @@ fi
# Without parameters, start with web interface # Without parameters, start with web interface
if [ $# = 0 ]; then if [ $# = 0 ]; then
set -- direct_webstart set -- $MAX_OLD_SPACE_SIZE direct_webstart
else
set -- $MAX_OLD_SPACE_SIZE "$@"
fi fi
# Start duniter # Start duniter
......
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