Add RESET_CONFIG option to entrypoint

This commit is contained in:
durch
2025-06-06 09:38:28 +02:00
parent f4d0ac855c
commit 8a960985c9
3 changed files with 8 additions and 2 deletions
Generated
+1 -1
View File
@@ -4731,7 +4731,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "nym-api"
version = "1.1.61"
version = "1.1.62"
dependencies = [
"anyhow",
"async-trait",
+1 -1
View File
@@ -4,7 +4,7 @@
[package]
name = "nym-api"
license = "GPL-3.0"
version = "1.1.61"
version = "1.1.62"
authors.workspace = true
edition = "2021"
rust-version.workspace = true
+6
View File
@@ -2,5 +2,11 @@
set -e
# Optional: delete existing config and force reinit
if [ "$NYM_API_RESET_CONFIG" = "true" ]; then
echo "RESET_CONFIG enabled - removing existing configuration..."
rm -rf ~/.nym/nym-api
fi
# Init can fail if the mounted volume already has a config
/usr/src/nym/target/release/nym-api init --mnemonic "$MNEMONIC" || true && /usr/src/nym/target/release/nym-api run --mnemonic "$MNEMONIC"