From 2a00697af7c0694669ee533afcb1187d1a7e7c07 Mon Sep 17 00:00:00 2001 From: Luke Zhu Date: Wed, 5 Mar 2025 01:24:27 -0800 Subject: [PATCH] :art: Support SIYUAN_WORKSPACE_PATH in Docker (#14286) This change makes SIYUAN_WORKSPACE_PATH env variable update the WORKSPACE_DIR variable in the Docker entrypoint shell script. --- kernel/entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/entrypoint.sh b/kernel/entrypoint.sh index 399a17f5e..6c8d65782 100644 --- a/kernel/entrypoint.sh +++ b/kernel/entrypoint.sh @@ -28,8 +28,11 @@ else adduser --uid "${PUID}" --ingroup "${group_name}" --disabled-password --gecos "" "${user_name}" fi -# Parse command line arguments for --workspace option +# Parse command line arguments for --workspace option or SIYUAN_WORKSPACE_PATH env variable # Store other arguments in ARGS for later use +if [[ -n "${SIYUAN_WORKSPACE_PATH}" ]]; then + WORKSPACE_DIR="${SIYUAN_WORKSPACE_PATH}" +fi ARGS="" while [[ "$#" -gt 0 ]]; do case $1 in