Skip to content

Commit

Permalink
Add download_community_snapshot option
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeto9 committed Oct 16, 2024
1 parent 640b3da commit 8a5b127
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
9 changes: 9 additions & 0 deletions node-runner-cli/commands/dockercommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ def config(args):
" CLI prompts to confirm the versions if '-a' is not passed",
action="store_true",
),
argument(
"-dcs",
"--downloadcommunitysnapshot",
help="Boolean to indicate if in case of empty ledger, downloads latest community snapshot"
"It is templated into default.config and acts as custom configuration that is not overwritten on install. "
f"The default value is true if not provided",
default="true",
action="store",
)
]
)
def install(args):
Expand Down
16 changes: 9 additions & 7 deletions node-runner-cli/templates/radix-fullnode-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
version: '3.8'
services:
{% if core_node is not none and core_node is defined %}
download-community-ledger-snapshot:
build:
context: .
dockerfile: Dockerfile.ledgerdownloader
volumes:
- /data:/data
{% if download_community_snapshot == "true" %}
download-community-ledger-snapshot:
build:
context: .
dockerfile: Dockerfile.ledgerdownloader
volumes:
- /data:/data
{% endif %}
core:
cap_add:
- NET_ADMIN
{% if core_node.advanced_user_envs is defined and core_node.advanced_user_envs is not none %}
env_file:
- {{core_node.advanced_user_envs}}
{% endif %}
{% if download-community-snapshot == "true" %}
{% if download_community_snapshot == "true" %}
depends_on:
- download-community-ledger-snapshot
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion node-runner-cli/templates/systemd-default.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

ntp=false
ntp.pool=pool.ntp.org

download_community_snapshot=true
network.id={{common_config.network_id}}
{% if common_config.genesis_bin_data_file is not none %}
network.genesis_data_file={{common_config.genesis_bin_data_file}}
Expand Down

0 comments on commit 8a5b127

Please sign in to comment.