From 90aa3bbbbd0407555a3e15acf308e72730fdae68 Mon Sep 17 00:00:00 2001 From: Yanchao Wang Date: Thu, 11 Apr 2024 10:55:07 -0500 Subject: [PATCH 1/2] update to synology path/arch --- README.md | 3 +++ docker/make.sh | 5 +++-- src/defs.rs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca92fd9..3a400fa 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ cargo build --release --target x86_64-unknown-linux-musl for docker +To build for other platforms, modify the TARGET_ARCH variable in ./docker/make.sh. + +For example, with Raspbarry Pi 4, use TARGET_ARCH=aarch64-unknown-linux-gnu ```bash ./docker/make.sh ``` diff --git a/docker/make.sh b/docker/make.sh index bf43ccd..40b7436 100755 --- a/docker/make.sh +++ b/docker/make.sh @@ -1,13 +1,14 @@ #!/bin/bash +TARGET_ARCH="aarch64-unknown-linux-gnu" SCRIPT=$(readlink -f "$0") DIR=$(dirname "$SCRIPT") VERSION=$(awk -F '"' '/^version/ {print $2}' "$DIR/../Cargo.toml") # build cd "$DIR/.." -cargo build --release --target x86_64-unknown-linux-musl -cp "$DIR/../target/x86_64-unknown-linux-musl/release/kosync" "$DIR/kosync" +cargo build --release --target "$TARGET_ARCH" +cp "$DIR/../target/$TARGET_ARCH/release/kosync" "$DIR/kosync" # build docker cd "$DIR" diff --git a/src/defs.rs b/src/defs.rs index 79a84bc..8ad1f1d 100644 --- a/src/defs.rs +++ b/src/defs.rs @@ -13,7 +13,7 @@ use serde_json::json; pub const DEFAULT_ADDR: &str = "0.0.0.0:3000"; pub const DEFAULT_TREE_NAME: &str = "kosync"; -pub const DEFAULT_DB_PATH: &str = "data/kosync"; +pub const DEFAULT_DB_PATH: &str = "/volume1/Cusanity/docker_data/kosync"; pub const FIELD_LEN_LIMIT: usize = 4096; #[derive(Debug, Deserialize, Serialize)] From 97bd00006a2d523d9b4af3cad37cd3926f24eb19 Mon Sep 17 00:00:00 2001 From: Yanchao Wang Date: Mon, 4 Aug 2025 14:52:54 -0500 Subject: [PATCH 2/2] fix: update DEFAULT_DB_PATH to correct file location --- src/defs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defs.rs b/src/defs.rs index 8ad1f1d..bb1ed08 100644 --- a/src/defs.rs +++ b/src/defs.rs @@ -13,7 +13,7 @@ use serde_json::json; pub const DEFAULT_ADDR: &str = "0.0.0.0:3000"; pub const DEFAULT_TREE_NAME: &str = "kosync"; -pub const DEFAULT_DB_PATH: &str = "/volume1/Cusanity/docker_data/kosync"; +pub const DEFAULT_DB_PATH: &str = "/volume1/homes/cusanity/oneDrive/RESET/NAS/docker_data/kosync"; pub const FIELD_LEN_LIMIT: usize = 4096; #[derive(Debug, Deserialize, Serialize)]