Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
images-sidecar-webdav
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
702
Projekty
EOSC Notebooks
images-sidecar-webdav
Commits
ec943472
Commit
ec943472
authored
May 13, 2024
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Configurable rclone VFS cache mode
parent
95629ff0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+8
-2
8 additions, 2 deletions
README.md
mount.sh
+3
-1
3 additions, 1 deletion
mount.sh
with
11 additions
and
3 deletions
README.md
+
8
−
2
View file @
ec943472
...
@@ -13,10 +13,16 @@ Using environment:
...
@@ -13,10 +13,16 @@ Using environment:
*
WEBDAV
\_
VENDOR: WebDAV vendor (default:
*other*
)
*
WEBDAV
\_
VENDOR: WebDAV vendor (default:
*other*
)
*
MOUNT
\_
OPTS: space separated additional arguments for
*rclone mount*
command
*
MOUNT
\_
OPTS: space separated additional arguments for
*rclone mount*
command
*
MOUNT
\_
PATH: mount path (default:
*/mnt*
)
*
MOUNT
\_
PATH: mount path (default:
*/mnt*
)
*
VFS
\_
CACHE
\_
MODE: value for rclone VFS cache mode (off, minimal, writes, full) (default:
*full*
)
Examples:
Examples:
docker run --privileged -it --rm --name oidcmount -e WEBDAV_URL="$WEBDAV_URL" -e WEBDAV_TOKEN="$(oidc-token my-issuer)" -v /tmp/webdav:/mnt:shared webdav-rclone-sidecar" &
docker run --privileged -it --rm --name oidcmount -v /tmp/webdav:/mnt:shared
-e WEBDAV_URL="$WEBDAV_URL" \
-e WEBDAV_TOKEN="$(oidc-token my-issuer)" \
webdav-rclone-sidecar" &
echo "$(oidc-token my-issuer)" >/tmp/token
echo "$(oidc-token my-issuer)" >/tmp/token
docker run --privileged -it --rm --name oidcmount -e WEBDAV_URL="$WEBDAV_URL" -v /tmp/webdav:/mnt:shared -v /tmp/token:/tmp/token webdav-rclone-sidecar bearer_token_command="cat /tmp/token" &
docker run --privileged -it --rm --name oidcmount -v /tmp/webdav:/mnt:shared -v /tmp/token:/tmp/token
-e WEBDAV_URL="$WEBDAV_URL" \
webdav-rclone-sidecar bearer_token_command="cat /tmp/token" &
This diff is collapsed.
Click to expand it.
mount.sh
+
3
−
1
View file @
ec943472
...
@@ -7,6 +7,7 @@ MOUNT_OPTS=${MOUNT_OPTS:-}
...
@@ -7,6 +7,7 @@ MOUNT_OPTS=${MOUNT_OPTS:-}
MOUNT_PATH
=
${
MOUNT_PATH
:-
/mnt/
}
MOUNT_PATH
=
${
MOUNT_PATH
:-
/mnt/
}
JOVYAN_UID
=
${
JOVYAN_UID
:-
1000
}
JOVYAN_UID
=
${
JOVYAN_UID
:-
1000
}
JOVYAN_GRP
=
${
JOVYAN_GRP
:-
100
}
JOVYAN_GRP
=
${
JOVYAN_GRP
:-
100
}
VFS_CACHE_MODE
=
${
VFS_CACHE_MODE
:-
full
}
if
[
!
-d
"
$MOUNT_PATH
"
]
;
then
if
[
!
-d
"
$MOUNT_PATH
"
]
;
then
mkdir
-p
"
$MOUNT_PATH
"
mkdir
-p
"
$MOUNT_PATH
"
...
@@ -37,4 +38,5 @@ rclone config create --non-interactive webdav-fs webdav "${args[@]}" "$@"
...
@@ -37,4 +38,5 @@ rclone config create --non-interactive webdav-fs webdav "${args[@]}" "$@"
# gid: unix group
# gid: unix group
# vfs-cache-mode: random access and cache
# vfs-cache-mode: random access and cache
IFS
=
" "
read
-r
-a
mount_opts
<<<
"
$MOUNT_OPTS
"
IFS
=
" "
read
-r
-a
mount_opts
<<<
"
$MOUNT_OPTS
"
rclone mount webdav-fs:/
"
$MOUNT_PATH
"
--allow-non-empty
--allow-other
--uid
=
"
$JOVYAN_UID
"
--gid
=
"
$JOVYAN_GRP
"
--vfs-cache-mode
=
full
"
${
mount_opts
[@]
}
"
mount_opts+
=(
"--vfs-cache-mode=
$VFS_CACHE_MODE
"
)
rclone mount webdav-fs:/
"
$MOUNT_PATH
"
--allow-non-empty
--allow-other
--uid
=
"
$JOVYAN_UID
"
--gid
=
"
$JOVYAN_GRP
"
"
${
mount_opts
[@]
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment